{ "openapi": "3.0.0", "servers": [ { "url": "https:\/\/{subdomain}\/api2\/", "description": "Production Server", "variables": { "subdomain": { "default": "azmart.daftra.com" } } } ], "info": { "title": "Daftra APIs", "version": "1.0", "description": "APIs For Daftra Project. Download: Postman collection<\/a>", "contact": { "name": "Daftra Support", "url": "https:\/\/www.daftra.com\/", "email": "support@daftra.com" }, "x-logo": { "url": "https:\/\/www.daftra.com\/css\/images\/daftra.png" } }, "paths": { "\/invoices\/{id}{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/id" }, { "$ref": "#\/components\/parameters\/format" } ], "get": { "summary": "GET Single Invoice", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "object", "properties": { "Invoice": { "allOf": [ { "$ref": "#\/components\/schemas\/InvoiceBase" }, { "$ref": "#\/components\/schemas\/Client" }, { "$ref": "#\/components\/schemas\/InvoiceItemRef" }, { "$ref": "#\/components\/schemas\/InvoicePaymentRef" }, { "$ref": "#\/components\/schemas\/InvoiceCustomField" }, { "$ref": "#\/components\/schemas\/Deposit" }, { "$ref": "#\/components\/schemas\/InvoiceReminder" }, { "$ref": "#\/components\/schemas\/Document" }, { "$ref": "#\/components\/schemas\/DocumentTitle" } ] } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Invoices" ] }, "put": { "summary": "Edit Invoices", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/Invoice" }, { "$ref": "#\/components\/schemas\/InvoiceItemRef" }, { "$ref": "#\/components\/schemas\/PaymentRef" }, { "$ref": "#\/components\/schemas\/InvoiceCustomField" }, { "$ref": "#\/components\/schemas\/Deposit" }, { "$ref": "#\/components\/schemas\/InvoiceReminder" }, { "$ref": "#\/components\/schemas\/Document" }, { "$ref": "#\/components\/schemas\/DocumentTitle" } ] } } } }, "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Invoices" ] }, "delete": { "summary": "Delete Invoices", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/TransactionFound" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" }, "500": { "$ref": "#\/components\/responses\/InternalServerError" } }, "tags": [ "Invoices" ] } }, "\/invoices{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/format" } ], "get": { "parameters": [ { "$ref": "#\/components\/parameters\/collectionLimit" }, { "$ref": "#\/components\/parameters\/collectionPage" } ], "summary": "GET All Invoices", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "array", "items": { "type": "object", "properties": { "Invoice": { "allOf": [ { "$ref": "#\/components\/schemas\/InvoiceBase" }, { "$ref": "#\/components\/schemas\/Client" } ] } } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" } }, "tags": [ "Invoices" ] }, "post": { "summary": "Add New Invoice", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/Invoice" }, { "$ref": "#\/components\/schemas\/InvoiceItemRef" }, { "$ref": "#\/components\/schemas\/PaymentRef" }, { "$ref": "#\/components\/schemas\/InvoiceCustomField" }, { "$ref": "#\/components\/schemas\/Deposit" }, { "$ref": "#\/components\/schemas\/InvoiceReminder" }, { "$ref": "#\/components\/schemas\/Document" }, { "$ref": "#\/components\/schemas\/DocumentTitle" } ] } } } }, "responses": { "202": { "description": "Created", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 202 }, "result": { "type": "string", "example": "successful" }, "id": { "type": "integer", "example": "2415" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Invoices" ] } }, "\/estimates\/{id}{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/id" }, { "$ref": "#\/components\/parameters\/format" } ], "get": { "summary": "GET Single Estimate", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "object", "properties": { "Estimate": { "allOf": [ { "$ref": "#\/components\/schemas\/InvoiceBase" }, { "$ref": "#\/components\/schemas\/Client" }, { "$ref": "#\/components\/schemas\/InvoiceItemRef" }, { "$ref": "#\/components\/schemas\/InvoicePaymentRef" }, { "$ref": "#\/components\/schemas\/InvoiceCustomField" }, { "$ref": "#\/components\/schemas\/Deposit" }, { "$ref": "#\/components\/schemas\/InvoiceReminder" }, { "$ref": "#\/components\/schemas\/Document" }, { "$ref": "#\/components\/schemas\/DocumentTitle" } ] } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Estimates" ] }, "put": { "summary": "Edit Estimates", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/Estimate" }, { "$ref": "#\/components\/schemas\/InvoiceItemRef" }, { "$ref": "#\/components\/schemas\/InvoicePaymentRef" }, { "$ref": "#\/components\/schemas\/InvoiceCustomField" }, { "$ref": "#\/components\/schemas\/Deposit" }, { "$ref": "#\/components\/schemas\/InvoiceReminder" }, { "$ref": "#\/components\/schemas\/Document" }, { "$ref": "#\/components\/schemas\/DocumentTitle" } ] } } } }, "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Estimates" ] }, "delete": { "summary": "Delete Estimates", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/TransactionFound" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" }, "500": { "$ref": "#\/components\/responses\/InternalServerError" } }, "tags": [ "Estimates" ] } }, "\/estimates{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/format" } ], "get": { "parameters": [ { "$ref": "#\/components\/parameters\/collectionLimit" }, { "$ref": "#\/components\/parameters\/collectionPage" } ], "summary": "GET All Estimates", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "array", "items": { "type": "object", "properties": { "Estimate": { "allOf": [ { "$ref": "#\/components\/schemas\/InvoiceBase" }, { "$ref": "#\/components\/schemas\/Client" } ] } } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" } }, "tags": [ "Estimates" ] }, "post": { "summary": "Add New Estimate", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/Estimate" }, { "$ref": "#\/components\/schemas\/InvoiceItemRef" }, { "$ref": "#\/components\/schemas\/InvoicePaymentRef" }, { "$ref": "#\/components\/schemas\/InvoiceCustomField" }, { "$ref": "#\/components\/schemas\/Deposit" }, { "$ref": "#\/components\/schemas\/InvoiceReminder" }, { "$ref": "#\/components\/schemas\/Document" }, { "$ref": "#\/components\/schemas\/DocumentTitle" } ] } } } }, "responses": { "202": { "description": "Created", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 202 }, "result": { "type": "string", "example": "successful" }, "id": { "type": "integer", "example": "2415" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Estimates" ] } }, "\/credit_notes\/{id}{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/id" }, { "$ref": "#\/components\/parameters\/format" } ], "get": { "summary": "GET Single Credit Note", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "object", "properties": { "CreditNote": { "allOf": [ { "$ref": "#\/components\/schemas\/InvoiceBase" }, { "$ref": "#\/components\/schemas\/Client" }, { "$ref": "#\/components\/schemas\/InvoiceItemRef" }, { "$ref": "#\/components\/schemas\/InvoicePaymentRef" }, { "$ref": "#\/components\/schemas\/InvoiceCustomField" }, { "$ref": "#\/components\/schemas\/Deposit" }, { "$ref": "#\/components\/schemas\/InvoiceReminder" }, { "$ref": "#\/components\/schemas\/Document" }, { "$ref": "#\/components\/schemas\/DocumentTitle" } ] } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Credit Notes" ] }, "put": { "summary": "Edit Credit Notes", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/CreditNote" }, { "$ref": "#\/components\/schemas\/InvoiceItemRef" }, { "$ref": "#\/components\/schemas\/InvoicePaymentRef" }, { "$ref": "#\/components\/schemas\/InvoiceCustomField" }, { "$ref": "#\/components\/schemas\/Deposit" }, { "$ref": "#\/components\/schemas\/InvoiceReminder" }, { "$ref": "#\/components\/schemas\/Document" }, { "$ref": "#\/components\/schemas\/DocumentTitle" } ] } } } }, "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Credit Notes" ] }, "delete": { "summary": "Delete Credit Notes", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/TransactionFound" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" }, "500": { "$ref": "#\/components\/responses\/InternalServerError" } }, "tags": [ "Credit Notes" ] } }, "\/credit_notes{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/format" } ], "get": { "parameters": [ { "$ref": "#\/components\/parameters\/collectionLimit" }, { "$ref": "#\/components\/parameters\/collectionPage" } ], "summary": "GET All Credit Notes", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "array", "items": { "type": "object", "properties": { "CreditNote": { "allOf": [ { "$ref": "#\/components\/schemas\/InvoiceBase" }, { "$ref": "#\/components\/schemas\/Client" } ] } } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" } }, "tags": [ "Credit Notes" ] }, "post": { "summary": "Add New Credit Note", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/CreditNote" }, { "$ref": "#\/components\/schemas\/InvoiceItemRef" }, { "$ref": "#\/components\/schemas\/InvoicePaymentRef" }, { "$ref": "#\/components\/schemas\/InvoiceCustomField" }, { "$ref": "#\/components\/schemas\/Deposit" }, { "$ref": "#\/components\/schemas\/InvoiceReminder" }, { "$ref": "#\/components\/schemas\/Document" }, { "$ref": "#\/components\/schemas\/DocumentTitle" } ] } } } }, "responses": { "202": { "description": "Created", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 202 }, "result": { "type": "string", "example": "successful" }, "id": { "type": "integer", "example": "2415" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Credit Notes" ] } }, "\/refund_receipts\/{id}{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/id" }, { "$ref": "#\/components\/parameters\/format" } ], "get": { "summary": "GET Single Refund Receipt", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "object", "properties": { "RefundReceipt": { "allOf": [ { "$ref": "#\/components\/schemas\/InvoiceBase" }, { "$ref": "#\/components\/schemas\/Client" }, { "$ref": "#\/components\/schemas\/InvoiceItemRef" }, { "$ref": "#\/components\/schemas\/InvoicePaymentRef" }, { "$ref": "#\/components\/schemas\/InvoiceCustomField" }, { "$ref": "#\/components\/schemas\/Deposit" }, { "$ref": "#\/components\/schemas\/InvoiceReminder" }, { "$ref": "#\/components\/schemas\/Document" }, { "$ref": "#\/components\/schemas\/DocumentTitle" } ] } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Refund Receipts" ] }, "put": { "summary": "Edit Refund Receipts", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/RefundReceipt" }, { "$ref": "#\/components\/schemas\/InvoiceItemRef" }, { "$ref": "#\/components\/schemas\/InvoicePaymentRef" }, { "$ref": "#\/components\/schemas\/InvoiceCustomField" }, { "$ref": "#\/components\/schemas\/Deposit" }, { "$ref": "#\/components\/schemas\/InvoiceReminder" }, { "$ref": "#\/components\/schemas\/Document" }, { "$ref": "#\/components\/schemas\/DocumentTitle" } ] } } } }, "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Refund Receipts" ] }, "delete": { "summary": "Delete Refund Receipts", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/TransactionFound" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" }, "500": { "$ref": "#\/components\/responses\/InternalServerError" } }, "tags": [ "Refund Receipts" ] } }, "\/refund_receipts{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/format" } ], "get": { "parameters": [ { "$ref": "#\/components\/parameters\/collectionLimit" }, { "$ref": "#\/components\/parameters\/collectionPage" } ], "summary": "GET All Refund Receipts", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "array", "items": { "type": "object", "properties": { "RefundReceipt": { "allOf": [ { "$ref": "#\/components\/schemas\/InvoiceBase" }, { "$ref": "#\/components\/schemas\/Client" } ] } } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" } }, "tags": [ "Refund Receipts" ] }, "post": { "summary": "Add New Refund Receipt", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/RefundReceipt" }, { "$ref": "#\/components\/schemas\/InvoiceItemRef" }, { "$ref": "#\/components\/schemas\/InvoicePaymentRef" }, { "$ref": "#\/components\/schemas\/InvoiceCustomField" }, { "$ref": "#\/components\/schemas\/Deposit" }, { "$ref": "#\/components\/schemas\/InvoiceReminder" }, { "$ref": "#\/components\/schemas\/Document" }, { "$ref": "#\/components\/schemas\/DocumentTitle" } ] } } } }, "responses": { "202": { "description": "Created", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 202 }, "result": { "type": "string", "example": "successful" }, "id": { "type": "integer", "example": "2415" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Refund Receipts" ] } }, "\/clients\/{id}{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/id" }, { "$ref": "#\/components\/parameters\/format" } ], "get": { "summary": "GET Single Client", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "object", "properties": { "Client": { "allOf": [ { "$ref": "#\/components\/schemas\/ClientBase" } ] } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Clients" ] }, "put": { "summary": "Edit Clients", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/Client" } ] } } } }, "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Clients" ] }, "delete": { "summary": "Delete Clients", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/TransactionFound" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" }, "500": { "$ref": "#\/components\/responses\/InternalServerError" } }, "tags": [ "Clients" ] } }, "\/clients{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/format" } ], "get": { "parameters": [ { "$ref": "#\/components\/parameters\/collectionLimit" }, { "$ref": "#\/components\/parameters\/collectionPage" } ], "summary": "GET All Clients", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "array", "items": { "type": "object", "properties": { "Client": { "allOf": [ { "$ref": "#\/components\/schemas\/ClientBase" } ] } } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" } }, "tags": [ "Clients" ] }, "post": { "summary": "Add New Client", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/Client" } ] } } } }, "responses": { "202": { "description": "Created", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 202 }, "result": { "type": "string", "example": "successful" }, "id": { "type": "integer", "example": "2415" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Clients" ] } }, "\/suppliers\/{id}{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/id" }, { "$ref": "#\/components\/parameters\/format" } ], "get": { "summary": "GET Single Supplier", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "object", "properties": { "Supplier": { "allOf": [ { "$ref": "#\/components\/schemas\/SupplierBase" } ] } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Suppliers" ] }, "put": { "summary": "Edit Suppliers", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/Supplier" } ] } } } }, "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Suppliers" ] }, "delete": { "summary": "Delete Suppliers", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/TransactionFound" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" }, "500": { "$ref": "#\/components\/responses\/InternalServerError" } }, "tags": [ "Suppliers" ] } }, "\/suppliers{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/format" } ], "get": { "parameters": [ { "$ref": "#\/components\/parameters\/collectionLimit" }, { "$ref": "#\/components\/parameters\/collectionPage" } ], "summary": "GET All Suppliers", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "array", "items": { "type": "object", "properties": { "Supplier": { "allOf": [ { "$ref": "#\/components\/schemas\/SupplierBase" } ] } } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" } }, "tags": [ "Suppliers" ] }, "post": { "summary": "Add New Supplier", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/Supplier" } ] } } } }, "responses": { "202": { "description": "Created", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 202 }, "result": { "type": "string", "example": "successful" }, "id": { "type": "integer", "example": "2415" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Suppliers" ] } }, "\/work_orders\/{id}{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/id" }, { "$ref": "#\/components\/parameters\/format" } ], "get": { "summary": "GET Single Work Order", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "object", "properties": { "WorkOrder": { "allOf": [ { "$ref": "#\/components\/schemas\/WorkOrderBase" } ] } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Work Orders" ] }, "put": { "summary": "Edit Work Orders", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/WorkOrder" } ] } } } }, "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Work Orders" ] }, "delete": { "summary": "Delete Work Orders", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/TransactionFound" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" }, "500": { "$ref": "#\/components\/responses\/InternalServerError" } }, "tags": [ "Work Orders" ] } }, "\/work_orders{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/format" } ], "get": { "parameters": [ { "$ref": "#\/components\/parameters\/collectionLimit" }, { "$ref": "#\/components\/parameters\/collectionPage" } ], "summary": "GET All Work Orders", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "array", "items": { "type": "object", "properties": { "WorkOrder": { "allOf": [ { "$ref": "#\/components\/schemas\/WorkOrderBase" } ] } } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" } }, "tags": [ "Work Orders" ] }, "post": { "summary": "Add New Work Order", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/WorkOrder" } ] } } } }, "responses": { "202": { "description": "Created", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 202 }, "result": { "type": "string", "example": "successful" }, "id": { "type": "integer", "example": "2415" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Work Orders" ] } }, "\/client_appointments\/{id}{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/id" }, { "$ref": "#\/components\/parameters\/format" } ], "get": { "summary": "GET Single Client Appointment", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "object", "properties": { "ClientAppointment": { "allOf": [ { "$ref": "#\/components\/schemas\/AppointmentBase" } ] } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Client Appointments" ] }, "put": { "summary": "Edit Client Appointments", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/ClientAppointment" } ] } } } }, "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Client Appointments" ] }, "delete": { "summary": "Delete Client Appointments", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/TransactionFound" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" }, "500": { "$ref": "#\/components\/responses\/InternalServerError" } }, "tags": [ "Client Appointments" ] } }, "\/client_appointments{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/format" } ], "get": { "parameters": [ { "$ref": "#\/components\/parameters\/collectionLimit" }, { "$ref": "#\/components\/parameters\/collectionPage" } ], "summary": "GET All Client Appointments", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "array", "items": { "type": "object", "properties": { "ClientAppointment": { "allOf": [ { "$ref": "#\/components\/schemas\/AppointmentBase" } ] } } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" } }, "tags": [ "Client Appointments" ] }, "post": { "summary": "Add New Client Appointment", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/ClientAppointment" } ] } } } }, "responses": { "202": { "description": "Created", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 202 }, "result": { "type": "string", "example": "successful" }, "id": { "type": "integer", "example": "2415" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Client Appointments" ] } }, "\/invoice_appointments\/{id}{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/id" }, { "$ref": "#\/components\/parameters\/format" } ], "get": { "summary": "GET Single Invoice Appointment", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "object", "properties": { "InvoiceAppointment": { "allOf": [ { "$ref": "#\/components\/schemas\/AppointmentBase" } ] } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Invoice Appointments" ] }, "put": { "summary": "Edit Invoice Appointments", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/InvoiceAppointment" } ] } } } }, "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Invoice Appointments" ] }, "delete": { "summary": "Delete Invoice Appointments", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/TransactionFound" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" }, "500": { "$ref": "#\/components\/responses\/InternalServerError" } }, "tags": [ "Invoice Appointments" ] } }, "\/invoice_appointments{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/format" } ], "get": { "parameters": [ { "$ref": "#\/components\/parameters\/collectionLimit" }, { "$ref": "#\/components\/parameters\/collectionPage" } ], "summary": "GET All Invoice Appointments", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "array", "items": { "type": "object", "properties": { "InvoiceAppointment": { "allOf": [ { "$ref": "#\/components\/schemas\/AppointmentBase" } ] } } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" } }, "tags": [ "Invoice Appointments" ] }, "post": { "summary": "Add New Invoice Appointment", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/InvoiceAppointment" } ] } } } }, "responses": { "202": { "description": "Created", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 202 }, "result": { "type": "string", "example": "successful" }, "id": { "type": "integer", "example": "2415" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Invoice Appointments" ] } }, "\/estimate_appointments\/{id}{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/id" }, { "$ref": "#\/components\/parameters\/format" } ], "get": { "summary": "GET Single Estimate Appointment", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "object", "properties": { "EstimateAppointment": { "allOf": [ { "$ref": "#\/components\/schemas\/AppointmentBase" } ] } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Estimate Appointments" ] }, "put": { "summary": "Edit Estimate Appointments", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/EstimateAppointment" } ] } } } }, "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Estimate Appointments" ] }, "delete": { "summary": "Delete Estimate Appointments", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/TransactionFound" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" }, "500": { "$ref": "#\/components\/responses\/InternalServerError" } }, "tags": [ "Estimate Appointments" ] } }, "\/estimate_appointments{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/format" } ], "get": { "parameters": [ { "$ref": "#\/components\/parameters\/collectionLimit" }, { "$ref": "#\/components\/parameters\/collectionPage" } ], "summary": "GET All Estimate Appointments", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "array", "items": { "type": "object", "properties": { "EstimateAppointment": { "allOf": [ { "$ref": "#\/components\/schemas\/AppointmentBase" } ] } } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" } }, "tags": [ "Estimate Appointments" ] }, "post": { "summary": "Add New Estimate Appointment", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/EstimateAppointment" } ] } } } }, "responses": { "202": { "description": "Created", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 202 }, "result": { "type": "string", "example": "successful" }, "id": { "type": "integer", "example": "2415" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Estimate Appointments" ] } }, "\/work_order_appointments\/{id}{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/id" }, { "$ref": "#\/components\/parameters\/format" } ], "get": { "summary": "GET Single Work Order Appointment", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "object", "properties": { "WorkOrderAppointment": { "allOf": [ { "$ref": "#\/components\/schemas\/AppointmentBase" } ] } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Work Order Appointments" ] }, "put": { "summary": "Edit Work Order Appointments", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/WorkOrderAppointment" } ] } } } }, "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Work Order Appointments" ] }, "delete": { "summary": "Delete Work Order Appointments", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/TransactionFound" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" }, "500": { "$ref": "#\/components\/responses\/InternalServerError" } }, "tags": [ "Work Order Appointments" ] } }, "\/work_order_appointments{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/format" } ], "get": { "parameters": [ { "$ref": "#\/components\/parameters\/collectionLimit" }, { "$ref": "#\/components\/parameters\/collectionPage" } ], "summary": "GET All Work Order Appointments", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "array", "items": { "type": "object", "properties": { "WorkOrderAppointment": { "allOf": [ { "$ref": "#\/components\/schemas\/AppointmentBase" } ] } } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" } }, "tags": [ "Work Order Appointments" ] }, "post": { "summary": "Add New Work Order Appointment", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/WorkOrderAppointment" } ] } } } }, "responses": { "202": { "description": "Created", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 202 }, "result": { "type": "string", "example": "successful" }, "id": { "type": "integer", "example": "2415" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Work Order Appointments" ] } }, "\/notes\/{id}{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/id" }, { "$ref": "#\/components\/parameters\/format" } ], "get": { "summary": "GET Single Note", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "object", "properties": { "Note": { "allOf": [ { "$ref": "#\/components\/schemas\/NoteBase" } ] } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Notes" ] }, "put": { "summary": "Edit Notes", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/Note" }, { "$ref": "#\/components\/schemas\/FollowUpReminder" } ] } } } }, "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Notes" ] }, "delete": { "summary": "Delete Notes", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/TransactionFound" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" }, "500": { "$ref": "#\/components\/responses\/InternalServerError" } }, "tags": [ "Notes" ] } }, "\/notes{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/format" } ], "get": { "parameters": [ { "$ref": "#\/components\/parameters\/collectionLimit" }, { "$ref": "#\/components\/parameters\/collectionPage" } ], "summary": "GET All Notes", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "array", "items": { "type": "object", "properties": { "Note": { "allOf": [ { "$ref": "#\/components\/schemas\/NoteBase" } ] } } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" } }, "tags": [ "Notes" ] } }, "\/notes\/{type}\/{id}{format}": { "post": { "summary": "Add New Note", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/Note" }, { "$ref": "#\/components\/schemas\/FollowUpReminder" } ] } } } }, "responses": { "202": { "description": "Created", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 202 }, "result": { "type": "string", "example": "successful" }, "id": { "type": "integer", "example": "2415" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Notes" ] } }, "\/time_tracking\/{id}{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/id" }, { "$ref": "#\/components\/parameters\/format" } ], "get": { "summary": "GET Single Time Tracking", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "object", "properties": { "TimeTracking": { "allOf": [ { "$ref": "#\/components\/schemas\/TimeTrackingBase" }, { "$ref": "#\/components\/schemas\/time_formatted" } ] } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Time Tracking" ] }, "put": { "summary": "Edit Time Tracking", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/TimeTracking" } ] } } } }, "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Time Tracking" ] }, "delete": { "summary": "Delete Time Tracking", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/TransactionFound" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" }, "500": { "$ref": "#\/components\/responses\/InternalServerError" } }, "tags": [ "Time Tracking" ] } }, "\/time_tracking{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/format" } ], "get": { "parameters": [ { "$ref": "#\/components\/parameters\/collectionLimit" }, { "$ref": "#\/components\/parameters\/collectionPage" } ], "summary": "GET All Time Tracking", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "array", "items": { "type": "object", "properties": { "TimeTracking": { "allOf": [ { "$ref": "#\/components\/schemas\/TimeTrackingBase" }, { "$ref": "#\/components\/schemas\/time_formatted" } ] } } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" } }, "tags": [ "Time Tracking" ] }, "post": { "summary": "Add New Time Tracking", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/TimeTracking" } ] } } } }, "responses": { "202": { "description": "Created", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 202 }, "result": { "type": "string", "example": "successful" }, "id": { "type": "integer", "example": "2415" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Time Tracking" ] } }, "\/invoice_payments\/{id}{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/id" }, { "$ref": "#\/components\/parameters\/format" } ], "get": { "summary": "GET Single Invoice Payment", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "object", "properties": { "InvoicePayment": { "allOf": [ { "$ref": "#\/components\/schemas\/PaymentBase" } ] } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Invoice Payments" ] }, "put": { "summary": "Edit Invoice Payments", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/InvoicePayment" } ] } } } }, "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Invoice Payments" ] }, "delete": { "summary": "Delete Invoice Payments", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/TransactionFound" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" }, "500": { "$ref": "#\/components\/responses\/InternalServerError" } }, "tags": [ "Invoice Payments" ] } }, "\/invoice_payments{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/format" } ], "get": { "parameters": [ { "$ref": "#\/components\/parameters\/collectionLimit" }, { "$ref": "#\/components\/parameters\/collectionPage" } ], "summary": "GET All Invoice Payments", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "array", "items": { "type": "object", "properties": { "InvoicePayment": { "allOf": [ { "$ref": "#\/components\/schemas\/PaymentBase" } ] } } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" } }, "tags": [ "Invoice Payments" ] }, "post": { "summary": "Add New Invoice Payment", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/InvoicePayment" } ] } } } }, "responses": { "202": { "description": "Created", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 202 }, "result": { "type": "string", "example": "successful" }, "id": { "type": "integer", "example": "2415" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Invoice Payments" ] } }, "\/client_payments\/{id}{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/id" }, { "$ref": "#\/components\/parameters\/format" } ], "get": { "summary": "GET Single Client Payment", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "object", "properties": { "ClientPayment": { "allOf": [ { "$ref": "#\/components\/schemas\/PaymentBase" } ] } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Client Payments" ] }, "put": { "summary": "Edit Client Payments", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/ClientPayment" } ] } } } }, "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Client Payments" ] }, "delete": { "summary": "Delete Client Payments", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/TransactionFound" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" }, "500": { "$ref": "#\/components\/responses\/InternalServerError" } }, "tags": [ "Client Payments" ] } }, "\/client_payments{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/format" } ], "get": { "parameters": [ { "$ref": "#\/components\/parameters\/collectionLimit" }, { "$ref": "#\/components\/parameters\/collectionPage" } ], "summary": "GET All Client Payments", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "array", "items": { "type": "object", "properties": { "ClientPayment": { "allOf": [ { "$ref": "#\/components\/schemas\/PaymentBase" } ] } } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" } }, "tags": [ "Client Payments" ] }, "post": { "summary": "Add New Client Payment", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/ClientPayment" } ] } } } }, "responses": { "202": { "description": "Created", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 202 }, "result": { "type": "string", "example": "successful" }, "id": { "type": "integer", "example": "2415" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Client Payments" ] } }, "\/products\/{id}{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/id" }, { "$ref": "#\/components\/parameters\/format" } ], "get": { "summary": "GET Single Product", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "object", "properties": { "Product": { "allOf": [ { "$ref": "#\/components\/schemas\/ProductBase" }, { "$ref": "#\/components\/schemas\/ProductImageRef" }, { "$ref": "#\/components\/schemas\/ProductCategoryRef" } ] } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Products" ] }, "put": { "summary": "Edit Products", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/Product" } ] } } } }, "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Products" ] }, "delete": { "summary": "Delete Products", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/TransactionFound" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" }, "500": { "$ref": "#\/components\/responses\/InternalServerError" } }, "tags": [ "Products" ] } }, "\/products{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/format" } ], "get": { "parameters": [ { "$ref": "#\/components\/parameters\/collectionLimit" }, { "$ref": "#\/components\/parameters\/collectionPage" } ], "summary": "GET All Products", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "array", "items": { "type": "object", "properties": { "Product": { "allOf": [ { "$ref": "#\/components\/schemas\/ProductBase" }, { "$ref": "#\/components\/schemas\/ProductImageRef" }, { "$ref": "#\/components\/schemas\/ProductCategoryRef" } ] } } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" } }, "tags": [ "Products" ] }, "post": { "summary": "Add New Product", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/Product" } ] } } } }, "responses": { "202": { "description": "Created", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 202 }, "result": { "type": "string", "example": "successful" }, "id": { "type": "integer", "example": "2415" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Products" ] } }, "\/journals\/{id}{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/id" }, { "$ref": "#\/components\/parameters\/format" } ], "get": { "summary": "GET Single Journal", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "object", "properties": { "Journal": { "allOf": [ { "$ref": "#\/components\/schemas\/JournalBase" }, { "$ref": "#\/components\/schemas\/JournalTransactionRef" } ] } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Journals" ] }, "put": { "summary": "Edit Journals", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/Journal" }, { "$ref": "#\/components\/schemas\/JournalTransactionRef" } ] } } } }, "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Journals" ] }, "delete": { "summary": "Delete Journals", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/TransactionFound" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" }, "500": { "$ref": "#\/components\/responses\/InternalServerError" } }, "tags": [ "Journals" ] } }, "\/journals{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/format" } ], "get": { "parameters": [ { "$ref": "#\/components\/parameters\/collectionLimit" }, { "$ref": "#\/components\/parameters\/collectionPage" } ], "summary": "GET All Journals", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "array", "items": { "type": "object", "properties": { "Journal": { "allOf": [ { "$ref": "#\/components\/schemas\/JournalBase" }, { "$ref": "#\/components\/schemas\/JournalTransactionRef" } ] } } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" } }, "tags": [ "Journals" ] }, "post": { "summary": "Add New Journal", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/Journal" }, { "$ref": "#\/components\/schemas\/JournalTransactionRef" } ] } } } }, "responses": { "202": { "description": "Created", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 202 }, "result": { "type": "string", "example": "successful" }, "id": { "type": "integer", "example": "2415" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Journals" ] } }, "\/journal_accounts\/{id}{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/id" }, { "$ref": "#\/components\/parameters\/format" } ], "get": { "summary": "GET Single Journal Account", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "object", "properties": { "JournalAccount": { "allOf": [ { "$ref": "#\/components\/schemas\/JournalAccountBase" } ] } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Journal Accounts" ] }, "put": { "summary": "Edit Journal Accounts", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/JournalAccount" } ] } } } }, "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Journal Accounts" ] }, "delete": { "summary": "Delete Journal Accounts", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/TransactionFound" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" }, "500": { "$ref": "#\/components\/responses\/InternalServerError" } }, "tags": [ "Journal Accounts" ] } }, "\/journal_accounts{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/format" } ], "get": { "parameters": [ { "$ref": "#\/components\/parameters\/collectionLimit" }, { "$ref": "#\/components\/parameters\/collectionPage" } ], "summary": "GET All Journal Accounts", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "array", "items": { "type": "object", "properties": { "JournalAccount": { "allOf": [ { "$ref": "#\/components\/schemas\/JournalAccountBase" } ] } } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" } }, "tags": [ "Journal Accounts" ] }, "post": { "summary": "Add New Journal Account", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/JournalAccount" } ] } } } }, "responses": { "202": { "description": "Created", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 202 }, "result": { "type": "string", "example": "successful" }, "id": { "type": "integer", "example": "2415" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Journal Accounts" ] } }, "\/journal_cats\/{id}{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/id" }, { "$ref": "#\/components\/parameters\/format" } ], "get": { "summary": "GET Single Journal Cat", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "object", "properties": { "JournalCat": { "allOf": [ { "$ref": "#\/components\/schemas\/JournalCatBase" } ] } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Journal Cats" ] }, "put": { "summary": "Edit Journal Cats", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/JournalCat" } ] } } } }, "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Journal Cats" ] }, "delete": { "summary": "Delete Journal Cats", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/TransactionFound" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" }, "500": { "$ref": "#\/components\/responses\/InternalServerError" } }, "tags": [ "Journal Cats" ] } }, "\/journal_cats{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/format" } ], "get": { "parameters": [ { "$ref": "#\/components\/parameters\/collectionLimit" }, { "$ref": "#\/components\/parameters\/collectionPage" } ], "summary": "GET All Journal Cats", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "array", "items": { "type": "object", "properties": { "JournalCat": { "allOf": [ { "$ref": "#\/components\/schemas\/JournalCatBase" } ] } } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" } }, "tags": [ "Journal Cats" ] }, "post": { "summary": "Add New Journal Cat", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/JournalCat" } ] } } } }, "responses": { "202": { "description": "Created", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 202 }, "result": { "type": "string", "example": "successful" }, "id": { "type": "integer", "example": "2415" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Journal Cats" ] } }, "\/expenses\/{id}{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/id" }, { "$ref": "#\/components\/parameters\/format" } ], "get": { "summary": "GET Single Expens", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "object", "properties": { "Expense": { "allOf": [ { "$ref": "#\/components\/schemas\/ExpenseBase" } ] } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Expenses" ] }, "put": { "summary": "Edit Expenses", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/Expense" } ] } } } }, "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Expenses" ] }, "delete": { "summary": "Delete Expenses", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/TransactionFound" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" }, "500": { "$ref": "#\/components\/responses\/InternalServerError" } }, "tags": [ "Expenses" ] } }, "\/expenses{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/format" } ], "get": { "parameters": [ { "$ref": "#\/components\/parameters\/collectionLimit" }, { "$ref": "#\/components\/parameters\/collectionPage" } ], "summary": "GET All Expenses", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "array", "items": { "type": "object", "properties": { "Expense": { "allOf": [ { "$ref": "#\/components\/schemas\/ExpenseBase" } ] } } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" } }, "tags": [ "Expenses" ] }, "post": { "summary": "Add New Expens", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/Expense" } ] } } } }, "responses": { "202": { "description": "Created", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 202 }, "result": { "type": "string", "example": "successful" }, "id": { "type": "integer", "example": "2415" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Expenses" ] } }, "\/incomes\/{id}{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/id" }, { "$ref": "#\/components\/parameters\/format" } ], "get": { "summary": "GET Single Income", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "object", "properties": { "Income": { "allOf": [ { "$ref": "#\/components\/schemas\/ExpenseBase" } ] } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Incomes" ] }, "put": { "summary": "Edit Incomes", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/Income" } ] } } } }, "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Incomes" ] }, "delete": { "summary": "Delete Incomes", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/TransactionFound" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" }, "500": { "$ref": "#\/components\/responses\/InternalServerError" } }, "tags": [ "Incomes" ] } }, "\/incomes{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/format" } ], "get": { "parameters": [ { "$ref": "#\/components\/parameters\/collectionLimit" }, { "$ref": "#\/components\/parameters\/collectionPage" } ], "summary": "GET All Incomes", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "array", "items": { "type": "object", "properties": { "Income": { "allOf": [ { "$ref": "#\/components\/schemas\/ExpenseBase" } ] } } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" } }, "tags": [ "Incomes" ] }, "post": { "summary": "Add New Income", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/Income" } ] } } } }, "responses": { "202": { "description": "Created", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 202 }, "result": { "type": "string", "example": "successful" }, "id": { "type": "integer", "example": "2415" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Incomes" ] } }, "\/taxes\/{id}{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/id" }, { "$ref": "#\/components\/parameters\/format" } ], "get": { "summary": "GET Single Taxe", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "object", "properties": { "Tax": { "allOf": [ { "$ref": "#\/components\/schemas\/TaxBase" } ] } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Taxes" ] }, "put": { "summary": "Edit Taxes", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/Tax" } ] } } } }, "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Taxes" ] }, "delete": { "summary": "Delete Taxes", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/TransactionFound" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" }, "500": { "$ref": "#\/components\/responses\/InternalServerError" } }, "tags": [ "Taxes" ] } }, "\/taxes{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/format" } ], "get": { "parameters": [ { "$ref": "#\/components\/parameters\/collectionLimit" }, { "$ref": "#\/components\/parameters\/collectionPage" } ], "summary": "GET All Taxes", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "array", "items": { "type": "object", "properties": { "Tax": { "allOf": [ { "$ref": "#\/components\/schemas\/TaxBase" } ] } } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" } }, "tags": [ "Taxes" ] }, "post": { "summary": "Add New Taxe", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/Tax" } ] } } } }, "responses": { "202": { "description": "Created", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 202 }, "result": { "type": "string", "example": "successful" }, "id": { "type": "integer", "example": "2415" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Taxes" ] } }, "\/purchase_invoices\/{id}{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/id" }, { "$ref": "#\/components\/parameters\/format" } ], "get": { "summary": "GET Single Purchase Invoice", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "object", "properties": { "PurchaseOrder": { "allOf": [ { "$ref": "#\/components\/schemas\/PurchaseOrderBase" }, { "$ref": "#\/components\/schemas\/Supplier" }, { "$ref": "#\/components\/schemas\/staff" }, { "$ref": "#\/components\/schemas\/PurchaseOrderItemRef" }, { "$ref": "#\/components\/schemas\/PurchaseOrderTaxRef" }, { "$ref": "#\/components\/schemas\/PurchaseOrderCustomField" }, { "$ref": "#\/components\/schemas\/PurchaseOrderPaymentRef" } ] } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Purchase Invoices" ] }, "put": { "summary": "Edit Purchase Invoices", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/PurchaseOrder" }, { "$ref": "#\/components\/schemas\/PurchaseOrderItemRef" } ] } } } }, "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Purchase Invoices" ] }, "delete": { "summary": "Delete Purchase Invoices", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/TransactionFound" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" }, "500": { "$ref": "#\/components\/responses\/InternalServerError" } }, "tags": [ "Purchase Invoices" ] } }, "\/purchase_invoices{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/format" } ], "get": { "parameters": [ { "$ref": "#\/components\/parameters\/collectionLimit" }, { "$ref": "#\/components\/parameters\/collectionPage" } ], "summary": "GET All Purchase Invoices", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "array", "items": { "type": "object", "properties": { "PurchaseOrder": { "allOf": [ { "$ref": "#\/components\/schemas\/PurchaseOrderBase" } ] } } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" } }, "tags": [ "Purchase Invoices" ] }, "post": { "summary": "Add New Purchase Invoice", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/PurchaseOrder" }, { "$ref": "#\/components\/schemas\/PurchaseOrderItemRef" } ] } } } }, "responses": { "202": { "description": "Created", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 202 }, "result": { "type": "string", "example": "successful" }, "id": { "type": "integer", "example": "2415" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Purchase Invoices" ] } }, "\/purchase_refunds\/{id}{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/id" }, { "$ref": "#\/components\/parameters\/format" } ], "get": { "summary": "GET Single Purchase Refund", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "object", "properties": { "PurchaseRefund": { "allOf": [ { "$ref": "#\/components\/schemas\/PurchaseOrderBase" } ] } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Purchase Refunds" ] }, "put": { "summary": "Edit Purchase Refunds", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/PurchaseRefund" }, { "$ref": "#\/components\/schemas\/PurchaseOrderItemRef" } ] } } } }, "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Purchase Refunds" ] }, "delete": { "summary": "Delete Purchase Refunds", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/TransactionFound" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" }, "500": { "$ref": "#\/components\/responses\/InternalServerError" } }, "tags": [ "Purchase Refunds" ] } }, "\/purchase_refunds{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/format" } ], "get": { "parameters": [ { "$ref": "#\/components\/parameters\/collectionLimit" }, { "$ref": "#\/components\/parameters\/collectionPage" } ], "summary": "GET All Purchase Refunds", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "array", "items": { "type": "object", "properties": { "PurchaseRefund": { "allOf": [ { "$ref": "#\/components\/schemas\/PurchaseOrderBase" } ] } } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" } }, "tags": [ "Purchase Refunds" ] }, "post": { "summary": "Add New Purchase Refund", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/PurchaseRefund" }, { "$ref": "#\/components\/schemas\/PurchaseOrderItemRef" } ] } } } }, "responses": { "202": { "description": "Created", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 202 }, "result": { "type": "string", "example": "successful" }, "id": { "type": "integer", "example": "2415" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Purchase Refunds" ] } }, "\/stock_transactions\/{id}{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/id" }, { "$ref": "#\/components\/parameters\/format" } ], "get": { "summary": "GET Single Stock Transaction", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "object", "properties": { "StockTransaction": { "allOf": [ { "$ref": "#\/components\/schemas\/StockTransactionBase" } ] } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Stock Transactions" ] }, "put": { "summary": "Edit Stock Transactions", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/StockTransaction" } ] } } } }, "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Stock Transactions" ] }, "delete": { "summary": "Delete Stock Transactions", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/TransactionFound" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" }, "500": { "$ref": "#\/components\/responses\/InternalServerError" } }, "tags": [ "Stock Transactions" ] } }, "\/stock_transactions{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/format" } ], "get": { "parameters": [ { "$ref": "#\/components\/parameters\/collectionLimit" }, { "$ref": "#\/components\/parameters\/collectionPage" } ], "summary": "GET All Stock Transactions", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "array", "items": { "type": "object", "properties": { "StockTransaction": { "allOf": [ { "$ref": "#\/components\/schemas\/StockTransactionBase" } ] } } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" } }, "tags": [ "Stock Transactions" ] }, "post": { "summary": "Add New Stock Transaction", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/StockTransaction" } ] } } } }, "responses": { "202": { "description": "Created", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 202 }, "result": { "type": "string", "example": "successful" }, "id": { "type": "integer", "example": "2415" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Stock Transactions" ] } }, "\/stores\/{id}{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/id" }, { "$ref": "#\/components\/parameters\/format" } ], "get": { "summary": "GET Single Store", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "object", "properties": { "Store": { "allOf": [ { "$ref": "#\/components\/schemas\/StoreBase" } ] } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Stores" ] }, "put": { "summary": "Edit Stores", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/Store" } ] } } } }, "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Stores" ] }, "delete": { "summary": "Delete Stores", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/TransactionFound" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" }, "500": { "$ref": "#\/components\/responses\/InternalServerError" } }, "tags": [ "Stores" ] } }, "\/stores{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/format" } ], "get": { "parameters": [ { "$ref": "#\/components\/parameters\/collectionLimit" }, { "$ref": "#\/components\/parameters\/collectionPage" } ], "summary": "GET All Stores", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "array", "items": { "type": "object", "properties": { "Store": { "allOf": [ { "$ref": "#\/components\/schemas\/StoreBase" } ] } } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" } }, "tags": [ "Stores" ] }, "post": { "summary": "Add New Store", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/Store" } ] } } } }, "responses": { "202": { "description": "Created", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 202 }, "result": { "type": "string", "example": "successful" }, "id": { "type": "integer", "example": "2415" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Stores" ] } }, "\/treasuries\/{id}{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/id" }, { "$ref": "#\/components\/parameters\/format" } ], "get": { "summary": "GET Single Treasury", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "object", "properties": { "Treasury": { "allOf": [ { "$ref": "#\/components\/schemas\/TreasuryBase" } ] } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Treasuries" ] }, "put": { "summary": "Edit Treasuries", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/Treasury" } ] } } } }, "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Treasuries" ] }, "delete": { "summary": "Delete Treasuries", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/TransactionFound" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" }, "500": { "$ref": "#\/components\/responses\/InternalServerError" } }, "tags": [ "Treasuries" ] } }, "\/treasuries{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/format" } ], "get": { "parameters": [ { "$ref": "#\/components\/parameters\/collectionLimit" }, { "$ref": "#\/components\/parameters\/collectionPage" } ], "summary": "GET All Treasuries", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "array", "items": { "type": "object", "properties": { "Treasury": { "allOf": [ { "$ref": "#\/components\/schemas\/TreasuryBase" } ] } } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" } }, "tags": [ "Treasuries" ] }, "post": { "summary": "Add New Treasury", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/Treasury" } ] } } } }, "responses": { "202": { "description": "Created", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 202 }, "result": { "type": "string", "example": "successful" }, "id": { "type": "integer", "example": "2415" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Treasuries" ] } }, "\/product_categories\/{id}{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/id" }, { "$ref": "#\/components\/parameters\/format" } ], "get": { "summary": "GET Single Product Category", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "object", "properties": { "ProductCategory": { "allOf": [ { "$ref": "#\/components\/schemas\/CategoryBase" } ] } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Product Categories" ] } }, "\/product_categories{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/format" } ], "get": { "parameters": [ { "$ref": "#\/components\/parameters\/collectionLimit" }, { "$ref": "#\/components\/parameters\/collectionPage" } ], "summary": "GET All Product Categories", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "array", "items": { "type": "object", "properties": { "ProductCategory": { "allOf": [ { "$ref": "#\/components\/schemas\/CategoryBase" } ] } } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "description": "Invalid Category You must send type from the types above", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "result": { "type": "string", "example": "failed" }, "code": { "type": "integer", "example": 404 }, "message": { "type": "string", "example": "Invalid category" } } } } } } }, "tags": [ "Product Categories" ] } }, "\/staff\/{id}{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/id" }, { "$ref": "#\/components\/parameters\/format" } ], "get": { "summary": "GET Single Staff", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "object", "properties": { "Staff": { "allOf": [ { "$ref": "#\/components\/schemas\/StaffBase" } ] } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Staff" ] } }, "\/staff{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/format" } ], "get": { "parameters": [ { "$ref": "#\/components\/parameters\/collectionLimit" }, { "$ref": "#\/components\/parameters\/collectionPage" } ], "summary": "GET All Staff", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "array", "items": { "type": "object", "properties": { "Staff": { "allOf": [ { "$ref": "#\/components\/schemas\/StaffBase" } ] } } } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" } }, "tags": [ "Staff" ] } }, "\/client-attendance-log\/{id}{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/id" }, { "$ref": "#\/components\/parameters\/format" } ] }, "\/client-attendance-log{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/format" } ] }, "\/client-attendance-log\/store": { "post": { "summary": "Add New Client-attendance-log", "requestBody": { "required": true, "content": { "application\/json": { "schema": { "allOf": [ { "$ref": "#\/components\/schemas\/ClientAttendance" } ] } } } }, "responses": { "202": { "description": "Created", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 202 }, "result": { "type": "string", "example": "successful" }, "id": { "type": "integer", "example": "2415" } } } } } }, "400": { "$ref": "#\/components\/responses\/ValidationErrors" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Client-attendance-log" ] } }, "\/follow_up_actions\/{id}{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/id" }, { "$ref": "#\/components\/parameters\/format" } ], "get": { "summary": "GET Single Follow Up Action", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "$ref": "#\/components\/schemas\/FollowUpAction" }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Follow Up Actions" ] }, "delete": { "summary": "Delete Follow Up Action", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/TransactionFound" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" }, "500": { "$ref": "#\/components\/responses\/InternalServerError" } }, "tags": [ "Follow Up Actions" ] } }, "\/follow_up_actions\/{type}{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/format" }, { "$ref": "#\/components\/parameters\/type" } ], "get": { "summary": "GET All Follow Up Actions", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "array", "items": { "$ref": "#\/components\/schemas\/FollowUpAction" } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" } }, "tags": [ "Follow Up Actions" ] } }, "\/follow_up_statuses\/{id}{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/id" }, { "$ref": "#\/components\/parameters\/format" } ], "get": { "summary": "GET Single Follow Up Status", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "$ref": "#\/components\/schemas\/FollowUpStatus" }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" } }, "tags": [ "Follow Up Statuses" ] }, "delete": { "summary": "Delete Follow Up Status", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" } } } } } }, "400": { "$ref": "#\/components\/responses\/TransactionFound" }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "$ref": "#\/components\/responses\/NotFound" }, "500": { "$ref": "#\/components\/responses\/InternalServerError" } }, "tags": [ "Follow Up Statuses" ] } }, "\/follow_up_statuses\/{type}{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/format" }, { "$ref": "#\/components\/parameters\/type" } ], "get": { "summary": "GET All Follow Up Statuses", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "array", "items": { "$ref": "#\/components\/schemas\/FollowUpStatus" } }, "pagination": { "$ref": "#\/components\/schemas\/Pagination" } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" } }, "tags": [ "Follow Up Statuses" ] } }, "\/listing\/{model}{format}": { "parameters": [ { "$ref": "#\/components\/parameters\/model" }, { "$ref": "#\/components\/parameters\/format" } ], "get": { "summary": "GET General Listing", "description": "Get list data as key,value pairs the key is the item_id and value is its title", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "object", "properties": { "Listing": { "type": "object", "additionalProperties": { "type": "object", "description": "Item key,value pair", "properties": { "item_id": { "type": "integer", "format": "int32" }, "title": { "type": "string" } } } } }, "example": { "Listing": { "1": "title1", "2": "title2" } } } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" }, "404": { "description": "Invalid Model You must send Model from the models mentioned above", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "result": { "type": "string", "example": "failed" }, "code": { "type": "integer", "example": 404 }, "message": { "type": "string", "example": "Invalid Endpoint" } } } } } } }, "tags": [ "General Listing" ] } }, "\/site_info{format}": { "get": { "summary": "GET Site Info", "description": "Get current site info", "responses": { "200": { "description": "OK", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "result": { "type": "string", "example": "successful" }, "data": { "type": "object", "properties": { "Site": { "type": "object", "properties": { "id": { "type": "integer", "format": "int32", "description": "current site id" }, "business_name": { "type": "string", "description": "business name of the owner" }, "first_name": { "type": "string", "description": "First name of the owner" }, "last_name": { "type": "string", "description": "Last name of the owner" }, "subdomain": { "type": "string", "description": "subdomin of the site" }, "site_logo": { "type": "string", "description": "default site logo" }, "invoice_logo": { "type": "string", "description": "default invoice logo" }, "address1": { "type": "string", "description": "address1 of the owner" }, "address2": { "type": "string", "description": "address2 of the owner" }, "city": { "type": "string", "description": "city of the owner" }, "state": { "type": "string", "description": "state of the owner" }, "postal_code": { "type": "string", "description": "postal code of the owner" }, "phone1": { "type": "string", "description": "phone1 of the owner" }, "phone2": { "type": "string", "description": "phone2 of the owner" }, "country_code": { "type": "string", "description": "countey code of the owner" }, "timezone": { "type": "integer", "description": "timezone of the owner [GET General Listing API with model `Timezone`](#tag\/General-Listing\/paths\/~1listing~1{model}{format}\/get)" }, "date_format": { "type": "integer", "description": "date format of the site [GET General Listing API with model `dateFormats`](#tag\/General-Listing\/paths\/~1listing~1{model}{format}\/get)" }, "currency_code": { "type": "string", "description": "default currency code" }, "language_code": { "type": "string", "description": "default language code" }, "email": { "type": "string", "format": "email", "description": "owner email" }, "staff_id": { "type": "integer", "description": "current staff id ```Equals -1 if access the api from different domain via ``` [APIKEY](#section\/Authentication\/APIKEY) get it from [GET STAFF](#tag\/Staff)" }, "is_super_admin": { "type": "boolean", "description": "if the current staff is super admin ```note that if the current staff is not super admin this parameter is not returned```", "nullable": true }, "currencyFormat": { "type": "string", "description": "default currency format" }, "numberFormat": { "type": "array", "description": "Array of three indcies that specify default number format `0 => how many decimals` `1 => decimalpoint symbol` `2 => separator symbol`" }, "SITE_HASH": { "type": "string", "description": "current site hash" } } } }, "example": { "Site": { "id": 44, "business_name": "Communication Techniques for", "first_name": "ERNBKB", "last_name": "Team", "subdomain": "azmart.daftra.com", "site_logo": "5a5b5b9c3b59c_5964b28344347_genie3.png", "invoice_logo": null, "address1": "abozabal", "address2": "hhy", "city": "khanka", "state": "qlyuopia", "postal_code": "13758", "phone1": "1022415830", "phone2": "1022415830", "country_code": "SA", "timezone": "13", "date_format": "3", "currency_code": "USD", "language_code": 41, "email": "example@example.com", "staff_id": -1, "currencyFormat": "$%s", "numberFormat": [ 2, ".", "," ], "SITE_HASH": "db4715bd" } } } } } } } }, "401": { "$ref": "#\/components\/responses\/Unauthorized" }, "403": { "$ref": "#\/components\/responses\/Forbidden" } }, "tags": [ "Site" ] } } }, "components": { "schemas": { "Pagination": { "type": "object", "properties": { "prev": { "type": "string", "nullable": true, "example": "\/api2\/clients\/?page=1" }, "next": { "type": "string", "nullable": true, "example": "\/api2\/clients\/?page=3" }, "page": { "type": "integer", "example": 2 }, "page_count": { "type": "integer", "example": 5 }, "total_results": { "type": "integer", "example": 98 } } }, "ClientAttendance": { "type": "object", "properties": { "ClientAttendance": { "$ref": "#\/components\/schemas\/ClientAttendanceBase" } } }, "ClientAttendanceBase": { "type": "object", "properties": { "time": { "type": "datetime", "description": "Date And Time", "example": "2020-04-29 12:55:53" } }, "required": [ "time" ] }, "TimeTracking": { "type": "object", "properties": { "TimeTracking": { "$ref": "#\/components\/schemas\/TimeTrackingBase" } } }, "TimeTrackingBase": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "description": "Unique Identifier", "example": 123, "readOnly": true }, "user_id": { "type": "integer", "format": "int32", "description": "??", "deprecated": true }, "staff_id": { "type": "integer", "format": "int32", "description": "Staff user working on this time tracking get it from [GET STAFF API](#tag\/Staff) if it's `0` that means the site owner is the staff" }, "project_id": { "type": "integer", "format": "int64", "description": "Project REF#, you can get it through the get it from [GET General Listing API with model `Product`](#tag\/General-Listing\/paths\/~1listing~1{model}{format}\/get)" }, "activity_id": { "type": "integer", "format": "int64", "description": "Activity REF#, you can get it through the get it from [GET General Listing API with model `TimeActivity`](#tag\/General-Listing\/paths\/~1listing~1{model}{format}\/get)" }, "date": { "type": "string", "format": "date", "description": "Date for the time to be tracked if empty the current date is used", "example": "2008-12-09" }, "time": { "type": "string", "pattern": "^\\d{1,}:\\d{2}$", "description": "Time tracked in hours:minutes", "example": "8:17" }, "notes": { "type": "string", "description": "Notes for the time tracking entry", "default": "" }, "created": { "type": "string", "format": "date-time", "description": "Time of creation for the Client", "example": "2018-05-10 00:42:00", "readOnly": true }, "modified": { "type": "string", "format": "date-time", "description": "Last Time this Client was updated", "example": "2018-05-12 13:05:06", "readOnly": true }, "cost": { "type": "number", "format": "double", "description": "Cost for the time entry calculated from `hourly_rate` of the staff", "example": 12.3539999999999992, "readOnly": true }, "currency": { "type": "string", "maxLength": "10", "description": "3 Digit currency code following ISO 4217 standard( used in retrieval only)", "example": "EGP", "readOnly": true }, "work_order_id": { "type": "integer", "description": "Work Order ID get it from [GET Work orders](#tag\/Work-Orders)", "default": null, "nullable": true } }, "required": [ "staff_id", "project_id", "activity_id", "time" ] }, "time_formatted": { "type": "object", "properties": { "time_formatted": { "type": "object", "properties": { "hours": { "type": "integer", "description": "hours spent on this time tracking", "example": "1" }, "minutes": { "type": "integer", "description": "minutes spent on this time tracking", "example": "30" }, "seconds": { "type": "integer", "description": "seconds spent on this time tracking", "example": "0" }, "string": { "type": "string", "description": "visual string representation of the time", "example": "01:30" } } } } }, "Invoice": { "type": "object", "properties": { "Invoice": { "$ref": "#\/components\/schemas\/InvoiceBase" } } }, "Estimate": { "type": "object", "properties": { "Estimate": { "$ref": "#\/components\/schemas\/InvoiceBase" } } }, "CreditNote": { "type": "object", "properties": { "CreditNote": { "$ref": "#\/components\/schemas\/InvoiceBase" } } }, "RefundReceipt": { "type": "object", "properties": { "RefundReceipt": { "$ref": "#\/components\/schemas\/InvoiceBase" } } }, "InvoiceBase": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "description": "Unique identifier", "example": 26, "readOnly": true }, "staff_id": { "type": "integer", "format": "int64", "description": "Staff ID who created the invoice get it from [GET STAFF API](#tag\/Staff) if it's `0` that means the site owner is the staff that created it", "example": 0, "default": 0 }, "subscription_id": { "type": "integer", "format": "int64", "description": "Invoice id which this invoice follows so when adding refund this field indicates which invoice is being refunded get the invoice ids from [GET All Invoices API](#tag\/Invoices\/paths\/~1invoices{format}\/get) when this field is set to `null` that means that this invoice isn't a child of any invoice", "example": 26, "default": null, "nullable": true }, "store_id": { "type": "integer", "format": "int64", "description": "The store which this invoice uses get it from [GET STORE API](#tag\/Stores)", "example": 0 }, "type": { "type": "integer", "format": "int64", "description": "invoice type", "enum": [ "0 => Invoice", "2 => Subscription", "3 => Estimate", "5 => Credit Note", "6 => Refund Receipt", "7 => BNR", "8 => Booking" ], "example": 0, "readOnly": true }, "no": { "type": "string", "maxLength": "255", "description": "Invoice number, this field is auto generated but can be overridden", "example": "0700000AAAAA0001", "nullable": true }, "po_number": { "type": "string", "maxLength": "255", "description": "Purchase invoice number", "example": 26, "nullable": true }, "name": { "type": "string", "maxLength": "255", "description": "used in template and subscription only", "nullable": true }, "client_id": { "type": "integer", "format": "int64", "description": "The client id get it from [GET Client API](#tag\/Clients)", "example": 15 }, "is_offline": { "type": "boolean", "description": "!! 0 \/ 1 indicates if the client is offline" }, "currency_code": { "type": "string", "maxLength": "10", "description": "Currency Code", "example": "USD" }, "client_business_name": { "type": "string", "maxLength": "100", "description": "Client's business name", "example": "Example Client" }, "client_first_name": { "type": "string", "maxLength": "255", "description": "Client's first name", "example": "Example" }, "client_last_name": { "type": "string", "maxLength": "255", "description": "Client's last name", "example": "Client" }, "client_email": { "type": "string", "format": "email", "maxLength": "255", "description": "Client's email", "example": "client@example.com" }, "client_address1": { "type": "string", "maxLength": "255", "description": "Client's Address line 1" }, "client_address2": { "type": "string", "maxLength": "255", "description": "Client's Address line 2" }, "client_postal_code": { "type": "string", "maxLength": "20", "description": "Client's postal code" }, "client_city": { "type": "string", "maxLength": "100", "description": "Client's City" }, "client_state": { "type": "string", "maxLength": "100", "description": "Client's State" }, "client_country_code": { "type": "string", "maxLength": "3", "description": "Client's country ISO \"ALPHA-2\" Code", "example": "EG" }, "date": { "type": "string", "format": "date", "description": "the date of the invoice", "example": "2018-11-07" }, "payment_status": { "type": "integer", "description": "payment status, on adding invoice this field is set automatically via invoice payments", "enum": [ "null => Unpaid", "'' => Unpaid", "0 => Unpaid", "1 => Partially Paid", "2 => Paid", "3 => Refunded", "4 => OverPaid", "-1 => Draft" ], "nullable": true, "example": 0, "readOnly": true }, "draft": { "type": "boolean", "description": "[0 => not draft,1 => draft]", "example": "0" }, "discount": { "type": "double", "description": "discount percentage of the invoice ```note that this field alternate with `discount_amount```` example to set 5% discount is set this field to 5 and `discount_amount` field to 0", "default": 0 }, "discount_amount": { "type": "double", "description": "absolute discount of the invoice ```note that this field alternate with `discount```` example to set 5 USD discount is set this field to 5 and `discount` field to 0", "default": 0 }, "deposit": { "type": "double", "description": "Deposit amount", "default": 0 }, "deposit_type": { "type": "integer", "description": "Deposit Type", "enum": [ "0 => Unpaid", "1 => Unpaid", "2 => Paid" ], "default": 0 }, "summary_subtotal": { "type": "double", "description": "total invoice without taxes", "default": 0, "readOnly": true }, "summary_discount": { "type": "double", "description": "total discount applied on the invoice", "default": 0, "readOnly": true }, "summary_total": { "type": "double", "description": "total invoice with taxes", "default": 0, "readOnly": true }, "summary_paid": { "type": "double", "description": "total paid amount", "default": 0, "readOnly": true }, "summary_unpaid": { "type": "double", "description": "total unpaid amount", "default": 0, "readOnly": true }, "summary_deposit": { "type": "double", "description": "total deposited amount", "default": 0, "readOnly": true }, "summary_refund": { "type": "double", "description": "total refunded amount", "default": 0, "readOnly": true }, "notes": { "type": "string", "description": "Notes for the client" }, "html_notes": { "type": "string", "description": "html template notes" }, "created": { "type": "date-time", "description": "the date when the invoice was created", "example": "2018-11-07", "readOnly": true }, "modified": { "type": "date-time", "description": "the last date when the invoice was modified", "example": "2018-11-07", "readOnly": true }, "invoice_layout_id": { "type": "integer", "format": "int64", "description": "the layout for viewing this invoice get it from [GET General Listing API with model `InvoiceLayout`](#tag\/General-Listing\/paths\/~1listing~1{model}{format}\/get) if not set the default layout is used", "example": 1, "nullable": true }, "estimate_id": { "type": "integer", "format": "int64", "description": "The estimate of this invoice get it from [GET Estimates API](#tag\/Estimates) if it's not set the primary store is used", "example": 0, "default": "The primary store id" }, "shipping_options": { "type": "integer", "description": "Deposit Type", "enum": [ "'' => Auto", "1 => Don't show shipping options", "2 => Show the main client details", "3 => Show secondary client details" ], "default": "" }, "shipping_amount": { "type": "double", "description": "Deposit amount", "default": null, "nullable": true }, "client_active_secondary_address": { "type": "boolean", "description": "0\/1 if the secondary data is active" }, "client_secondary_name": { "type": "string", "maxLength": "255", "description": "Supplier's name" }, "client_secondary_address1": { "type": "string", "maxLength": "255", "description": "Client's address line 1" }, "client_secondary_address2": { "type": "string", "maxLength": "255", "description": "Client's address line 2" }, "client_secondary_city": { "type": "string", "maxLength": "100", "description": "Client's City" }, "client_secondary_state": { "type": "string", "maxLength": "100", "description": "Client's State" }, "client_secondary_postal_code": { "type": "string", "maxLength": "50", "description": "Client's postal code" }, "client_secondary_country_code": { "type": "string", "maxLength": "10", "description": "Client's country ISO \"ALPHA-2\" Code" }, "follow_up_status": { "type": "integer", "description": "Follow Up Status get it from [GET Follow up statuses with model invoice](#tag\/Follow-Up-Statuses\/paths\/~1follow_up_statuses~1{type}{format}\/get)", "default": null, "nullable": true }, "work_order_id": { "type": "integer", "description": "Work Order ID get it from [GET Work orders](#tag\/Work-Orders)", "default": null, "nullable": true }, "requisition_delivery_status": { "type": "integer", "description": "Requisition delivery Status", "enum": [ "1 => Pending", "2 => Not All Available", "3 => Accepted", "4 => Cancelled", "5 => Modified" ], "default": null, "nullable": true }, "pos_shift_id": { "type": "integer", "description": "POS session id", "default": null, "nullable": true }, "source_type": { "type": "integer", "description": "Source type that created the invoice if it's `null` then this means the invoice has no source", "enum": [ "0 => Invoice", "2 => Subscription", "3 => Estimate", "5 => Credit Note", "6 => Refund Receipt", "7 => BNR", "8 => Booking" ], "default": null, "nullable": true, "readOnly": true }, "source_id": { "type": "integer", "description": "source item id that created the invoice", "default": null, "nullable": true, "readOnly": true }, "qr_code_url": { "type": "string", "description": "direct url for the QR Code image of that invoice for KSA Electronic Invoice only", "example": "https:\/\/yoursite.daftra.com\/qr\/?d64=QVE1TmIyaGhiV1ZrSUVGemFISmhaZ0lJTVRFMU16WTJRMUlERkRJd01qSXRNVEF0TWpoVU1EQTZNREU2TVRWYUJBRXdCUUV3" }, "invoice_html_url": { "type": "string", "description": "direct url that will return HTML code of the invoice", "example": "https:\/\/yoursite.daftra.com\/invoices\/preview\/2621?hash=c06543fe13bd4850b521733687c53259" }, "invoice_pdf_url": { "type": "string", "description": "direct url to download pdf version of the invoice", "example": "https:\/\/yoursite.daftra.com\/invoices\/view\/2621.pdf?hash=c06543fe13bd4850b521733687c53259" } }, "required": [ "client_id", "store_id" ] }, "PurchaseOrder": { "type": "object", "properties": { "PurchaseOrder": { "$ref": "#\/components\/schemas\/PurchaseOrderBase" } } }, "PurchaseRefund": { "type": "object", "properties": { "PurchaseRefund": { "$ref": "#\/components\/schemas\/PurchaseOrderBase" } } }, "PurchaseOrderBase": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "description": "Unique Identifier", "example": 98 }, "staff_id": { "type": "integer", "format": "int32", "description": "Staff user submitting the request" }, "no": { "type": "string", "maxLength": "255", "description": "Purchase invoice user identifier", "example": "987" }, "supplier_id": { "type": "integer", "format": "int64", "description": "Supplier REF#, you can get it through the Suppliers API" }, "is_offline": { "type": "boolean", "description": "0 : if it is an online order \/ 1 : if it is an offline order" }, "currency_code": { "type": "string", "maxLength": "3", "description": "3 Digit currency code following ISO 4217 standard", "example": "USD" }, "supplier_business_name": { "type": "string", "maxLength": "255", "description": "Supplier business name" }, "supplier_first_name": { "type": "string", "maxLength": "255", "description": "Supplier first name" }, "supplier_last_name": { "type": "string", "maxLength": "255", "description": "Supplier last name" }, "supplier_email": { "type": "string", "format": "email", "maxLength": "255", "description": "Supplier email" }, "supplier_address1": { "type": "string", "maxLength": "255", "description": "Supplier address line 1" }, "supplier_address2": { "type": "string", "maxLength": "255", "description": "Supplier address line 2" }, "supplier_postal_code": { "type": "string", "maxLength": "10", "description": "Supplier postal code" }, "supplier_city": { "type": "string", "maxLength": "100", "description": "Supplier City" }, "supplier_state": { "type": "string", "maxLength": "100", "description": "Supplier State" }, "supplier_country_code": { "type": "string", "maxLength": "3", "description": "Supplier Country code" }, "date": { "type": "string", "format": "date", "description": "Date of the purchase invoice" }, "draft": { "type": "boolean", "description": "1 : if it is only a draft and doesn't affect the stock, 0 : not a draft and will affect the stock" }, "Supplier_active_secondary_address": { "type": "boolean", "description": "" }, "Supplier_secondary_country_code": { "type": "string", "maxLength": "255", "description": "Supplier 2 country code" }, "Supplier_secondary_name": { "type": "string", "maxLength": "255", "description": "Supplier 2 name" }, "Supplier_secondary_address1": { "type": "string", "maxLength": "255", "description": "Supplier 2 address line 1" }, "Supplier_secondary_address2": { "type": "string", "maxLength": "255", "description": "Supplier 2 address line 2" }, "Supplier_secondary_city": { "type": "string", "maxLength": "255", "description": "Supplier 2 City" }, "Supplier_secondary_state": { "type": "string", "maxLength": "255", "description": "Supplier 2 State" }, "Supplier_secondary_postal_code": { "type": "string", "maxLength": "255", "description": "Supplier 2 Postal code" }, "is_received": { "type": "boolean", "description": "0: the supplies are not received \/1 the supplies are received" }, "received_date": { "type": "string", "format": "date-time", "description": "Date for when it was received ", "example": "2019-10-30 12:59:30" } } }, "PurchaseOrderItem": { "type": "object", "properties": { "PurchaseOrderItem": { "type": "object", "properties": { "id": { "type": "integer", "description": "Purchase Order Item ID", "readOnly": true }, "product_id": { "type": "integer", "format": "int32", "description": "Product Ref #" }, "org_name": { "type": "string", "format": "", "description": "Name of the category that this item is following" }, "description": { "type": "string", "format": "", "description": "Description of the item" }, "unit_price": { "type": "number", "format": "double", "description": "Unit price of the item" }, "quantity": { "type": "integer", "format": "int32", "description": "Quantity of the item in the order" }, "tax1": { "type": "number", "format": "double", "description": "Tax 1 value applied on this item" }, "tax2": { "type": "number", "format": "double", "description": "Tax 2 value applied on this item " }, "purchase_order_id": { "type": "integer", "description": "Purchase Order Ref #" }, "item": { "type": "string", "description": "Name of the product" }, "summary_tax1": { "type": "number", "format": "double", "description": "Tax 1 calculated amount applied on this item", "readOnly": true }, "summary_tax2": { "type": "number", "format": "double", "description": "Tax 2 calculated amount applied on this item", "readOnly": true }, "subtotal": { "type": "number", "format": "double", "description": "total price of the product without taxes", "readOnly": true }, "col_3": { "type": "string", "description": "additional data to be appear in the Purchase Order layout", "default": null, "nullable": true }, "col_4": { "type": "string", "description": "additional data to be appear in the Purchase Order layout", "default": null, "nullable": true }, "col_5": { "type": "string", "description": "additional data to be appear in the Purchase Order layout", "default": null, "nullable": true }, "discount": { "type": "number", "format": "double", "description": "discount amount" }, "discount_type": { "type": "integer", "description": "discount type", "enum": [ "1 => Percentage", "2 => Absolute" ] }, "store_id": { "type": "integer", "format": "int64", "description": "The store which this item belongs to get it from [GET STORE API](#tag\/Stores) if it's not set the Purchase Order store is used", "example": 0, "default": "The Purchase Order store id" }, "calculated_discount": { "type": "number", "format": "double", "description": "total applied discount on this item", "readOnly": true }, "created": { "type": "string", "format": "date-time", "description": "Time of creation for this item", "example": "2018-05-10 00:42:00", "readOnly": true }, "modified": { "type": "string", "format": "date-time", "description": "Last Time this item was updated", "example": "2018-05-12 13:05:06", "readOnly": true } } } } }, "Client": { "type": "object", "properties": { "Client": { "$ref": "#\/components\/schemas\/ClientBase" } } }, "ClientBase": { "type": "object", "properties": { "id": { "type": "integer", "format": "int32", "description": "Primary Key", "example": 512, "readOnly": true }, "is_offline": { "type": "boolean", "description": "0 \/ 1 indicates if the Client is offline" }, "client_number": { "type": "string", "description": "Visual identifier for the Client", "example": "0000715" }, "staff_id": { "type": "integer", "format": "int64", "description": "Staff ID who created the invoice get it from [GET STAFF API](#tag\/Staff) if it's `0` that means the site owner is the staff that created it", "example": 0, "default": 0 }, "business_name": { "type": "string", "maxLength": 100, "description": "Client's business name", "example": "John Smith" }, "first_name": { "type": "string", "maxLength": 255, "description": "Client's first name", "example": "" }, "last_name": { "type": "string", "maxLength": 255, "description": "Client's last name", "example": "" }, "email": { "type": "string", "format": "email", "maxLength": 255, "description": "Client's email" }, "password": { "type": "string", "maxLength": 255, "description": "Client's password", "writeOnly": true }, "address1": { "type": "string", "maxLength": 255, "description": "Client's Address line 1" }, "address2": { "type": "string", "maxLength": 255, "description": "Client's Address line 2" }, "city": { "type": "string", "maxLength": 100, "description": "Client's City" }, "state": { "type": "string", "maxLength": 100, "description": "Client's State" }, "postal_code": { "type": "string", "maxLength": 20, "description": "Client's postal code" }, "phone1": { "type": "string", "maxLength": 50, "description": "Client's phone number" }, "phone2": { "type": "string", "maxLength": 50, "description": "Client's mobile number" }, "country_code": { "type": "string", "maxLength": 3, "description": "Client's country ISO \"ALPHA-2 Code" }, "notes": { "type": "string", "description": "Notes for the Client" }, "active_secondary_address": { "type": "boolean", "description": "0\/1 if the secondary data is active." }, "secondary_name": { "type": "string", "maxLength": 255, "description": "Client's name" }, "secondary_address1": { "type": "string", "maxLength": 255, "description": "Client's address line 1" }, "secondary_address2": { "type": "string", "maxLength": 255, "description": "Client's address line 2" }, "secondary_city": { "type": "string", "maxLength": 100, "description": "Client's City" }, "secondary_state": { "type": "string", "maxLength": 100, "description": "Client's State" }, "secondary_postal_code": { "type": "string", "maxLength": 50, "description": "Client's postal code" }, "secondary_country_code": { "type": "string", "maxLength": 10, "description": "Client's country ISO \"ALPHA-2 Code" }, "default_currency_code": { "type": "string", "maxLength": 5, "description": "3 Digit currency code following ISO 4217 standard" }, "last_login": { "type": "string", "format": "date-time", "description": "Time of the lsat successful login for the Client", "example": "2018-05-10 00:42:00", "readOnly": true }, "suspend": { "type": "boolean", "description": "0\/1 indicating if the account is suspended.", "readOnly": true }, "last_ip": { "type": "string", "description": "the last ip of the device where the client logged in from", "example": "127.0.0.1", "readOnly": true }, "created": { "type": "string", "format": "date-time", "description": "Time of creation for the Client", "example": "2018-05-10 00:42:00", "readOnly": true }, "modified": { "type": "string", "format": "date-time", "description": "Last Time this Client was updated", "example": "2018-05-12 13:05:06", "readOnly": true }, "follow_up_status": { "type": "integer", "description": "Follow Up Status get it from [GET Follow up statuses with model client](#tag\/Follow-Up-Statuses\/paths\/~1follow_up_statuses~1{type}{format}\/get)", "default": null, "nullable": true }, "category": { "type": "string", "description": "label for the client" }, "group_price_id": { "type": "integer", "format": "int32", "description": "Group price Ref get it from [GET General Listing API with model `GroupPrice`](#tag\/General-Listing\/paths\/~1listing~1{model}{format}\/get)" }, "timezone": { "type": "integer", "format": "int32", "description": "Timezone id get it from [GET General Listing API with model `Timezone`](#tag\/General-Listing\/paths\/~1listing~1{model}{format}\/get)" }, "bn1": { "type": "string", "description": "value for the bn1" }, "bn1_label": { "type": "string", "description": "label for the bn1 depends on the country like `Tax ID number` OR `Business number`" }, "bn2_label": { "type": "string", "description": "label for the bn2 depends on the country like `Tax ID number` OR `Business number`" }, "bn2": { "type": "string", "description": "value for the bn2" }, "starting_balance": { "type": "double", "description": "starting balance of the client", "default": null, "nullable": true }, "type": { "type": "integer", "description": "client type", "enum": [ "2 => 'Individual'", "3 => 'Business'" ], "default": null, "nullable": true, "example": 2 }, "birth_date": { "type": "string", "format": "date", "description": "client's birth date", "example": "2018-05-10" }, "gender": { "type": "integer", "description": "client gender", "enum": [ "null => 'Not selected'", "0 => 'Not selected'", "1 => 'Male'", "2 => 'Female'" ], "default": null, "nullable": true, "example": 2 }, "map_location": { "type": "string", "description": "client's map location (latitude,longitude,zoom)", "example": "31.287550225000018,30.075630726558106,5", "default": null, "nullable": true }, "credit_limit": { "type": "string", "description": "client's credit limit", "default": 0 }, "credit_period": { "type": "string", "description": "client's credit period in days", "default": 0 } }, "required": [ "type", "business_name", "first_name", "last_name", "email", "password" ] }, "Staff": { "type": "object", "properties": { "Staff": { "$ref": "#\/components\/schemas\/StaffBase" } } }, "StaffBase": { "type": "object", "properties": { "id": { "type": "integer", "format": "int32", "description": "Primary Key", "example": 512, "readOnly": true }, "added_by": { "type": "integer", "format": "int64", "description": "Staff ID who created the Staff get it from [GET STAFF API](#tag\/Staff) if it's `0` that means the site owner is the staff that created it", "example": 0, "default": 0 }, "role_id": { "type": "integer", "format": "int32", "description": "the Staff Role get it from [GET General Listing by sending `Role` as Model](#tag\/General-Listing)", "example": 1, "readOnly": true }, "name": { "type": "string", "maxLength": 255, "description": "Staff's first name", "example": "" }, "home_phone": { "type": "string", "maxLength": 50, "description": "Staff's home number" }, "business_Phone": { "type": "string", "maxLength": 50, "description": "Staff's business number" }, "mobile": { "type": "string", "maxLength": 50, "description": "Staff's mobile number" }, "fax": { "type": "string", "maxLength": 50, "description": "Staff's fax number" }, "country_code": { "type": "string", "maxLength": 3, "description": "Staff's country ISO \"ALPHA-2 Code" }, "address1": { "type": "string", "maxLength": 255, "description": "Staff's Address line 1" }, "address2": { "type": "string", "maxLength": 255, "description": "Staff's Address line 2" }, "city": { "type": "string", "maxLength": 100, "description": "Staff's City" }, "state": { "type": "string", "maxLength": 100, "description": "Staff's State" }, "postal_code": { "type": "string", "maxLength": 20, "description": "Staff's postal code" }, "notes": { "type": "string", "description": "Notes for the Staff" }, "email_address": { "type": "string", "format": "email", "maxLength": 255, "description": "Staff's email" }, "password": { "type": "string", "maxLength": 255, "description": "Staff's password", "writeOnly": true }, "last_login": { "type": "string", "format": "date-time", "description": "Time of the lsat successful login for the Staff", "example": "2018-05-10 00:42:00", "readOnly": true }, "active": { "type": "boolean", "description": "0\/1 indicating if the account is active.", "readOnly": true }, "deleted": { "type": "boolean", "description": "0\/1 indicating if the account is deleted.", "readOnly": true }, "created": { "type": "string", "format": "date-time", "description": "Time of creation for the Staff", "example": "2018-05-10 00:42:00", "readOnly": true }, "follow_up_status": { "type": "integer", "description": "Follow Up Status get it from [GET Follow up statuses with model staff](#tag\/Follow-Up-Statuses\/paths\/~1follow_up_statuses~1{type}{format}\/get)", "default": null, "nullable": true }, "hourly_rate": { "type": "double", "description": "hour rate of the staff", "default": null, "nullable": true }, "hourly_rate_currency_code": { "type": "string", "maxLength": 5, "description": "3 Digit currency code following ISO 4217 standard", "example": "USD" }, "default_store_id": { "type": "integer", "format": "int32", "description": "Store Ref get it from [GET Treasuries](#tag\/Stores)" }, "default_treasury_id": { "type": "integer", "format": "int32", "description": "Treasury Ref get it from [GET Treasuries](#tag\/Treasuries)" }, "language_code": { "type": "string", "description": "default language code get it from [GET General Listing by sending `languageCodes` as Model](#tag\/General-Listing)" }, "maximum_general_discount": { "type": "string", "description": "specify the discount limit this staff can make ```if null then this staff has no limit he can make amy discount amount```", "example": "500", "nullable": true, "default": null } }, "required": [ "name", "role_id", "email_address", "password" ] }, "Supplier": { "type": "object", "properties": { "Supplier": { "$ref": "#\/components\/schemas\/SupplierBase" } } }, "SupplierBase": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "description": "Unique identifier", "readOnly": true }, "is_offline": { "type": "boolean", "description": "!! 0 \/ 1 indicates if the supplier is offline" }, "supplier_number": { "type": "integer", "format": "int32", "description": "Visual identifier for the supplier" }, "staff_id": { "type": "integer", "format": "int64", "description": "Staff ID who created the supplier get it from [GET STAFF API](#tag\/Staff) if it's `0` that means the site owner is the staff that created it", "example": 0, "default": 0 }, "business_name": { "type": "string", "maxLength": "100", "description": "Supplier's business name" }, "first_name": { "type": "string", "maxLength": "255", "description": "Supplier's first name" }, "last_name": { "type": "string", "maxLength": "255", "description": "Supplier's last name" }, "email": { "type": "string", "maxLength": "255", "description": "Supplier's email" }, "password": { "type": "string", "maxLength": "255", "description": "Supplier's password", "writeOnly": true }, "address1": { "type": "string", "maxLength": "255", "description": "Supplier's Address line 1" }, "address2": { "type": "string", "maxLength": "255", "description": "Supplier's Address line 2" }, "city": { "type": "string", "maxLength": "100", "description": "Supplier's City" }, "state": { "type": "string", "maxLength": "100", "description": "Supplier's State" }, "postal_code": { "type": "string", "maxLength": "20", "description": "Supplier's postal code" }, "phone1": { "type": "string", "maxLength": "50", "description": "Supplier's phone number" }, "phone2": { "type": "string", "maxLength": "50", "description": "Supplier's mobile number" }, "country_code": { "type": "string", "maxLength": "3", "description": "Supplier's country ISO \"ALPHA-2\" Code" }, "notes": { "type": "string", "description": "Notes for the supplier" }, "active_secondary_address": { "type": "boolean", "description": "0\/1 if the secondary data is active." }, "secondary_name": { "type": "string", "maxLength": "255", "description": "Supplier's name" }, "secondary_address1": { "type": "string", "maxLength": "255", "description": "Supplier's address line 1" }, "secondary_address2": { "type": "string", "maxLength": "255", "description": "Supplier's address line 2" }, "secondary_city": { "type": "string", "maxLength": "100", "description": "Supplier's City" }, "secondary_state": { "type": "string", "maxLength": "100", "description": "Supplier's State" }, "secondary_postal_code": { "type": "string", "maxLength": "50", "description": "Supplier's postal code" }, "secondary_country_code": { "type": "string", "maxLength": "10", "description": "Supplier's country ISO \"ALPHA-2\" Code" }, "language_code": { "type": "string", "description": "default language code get it from [GET General Listing by sending `languageCodes` as Model](#tag\/General-Listing)" }, "default_currency_code": { "type": "string", "maxLength": "5", "description": "3 Digit currency code following ISO 4217 standard " }, "last_login": { "type": "string", "format": "date-time", "description": "Time of the lsat successful login for the Client", "example": "2018-05-10 00:42:00", "readOnly": true }, "suspend": { "type": "boolean", "description": "0\/1 indicating if the account is suspended.", "readOnly": true }, "last_ip": { "type": "string", "description": "the last ip of the device where the Supplier logged in from", "example": "127.0.0.1", "readOnly": true }, "created": { "type": "string", "format": "date-time", "description": "Time of creation for the Supplier", "example": "2018-05-10 00:42:00", "readOnly": true }, "modified": { "type": "string", "format": "date-time", "description": "Last Time this Supplier was updated", "example": "2018-05-12 13:05:06", "readOnly": true }, "follow_up_status": { "type": "integer", "description": "Follow Up Status get it from [GET Follow up statuses with model supplier](#tag\/Follow-Up-Statuses\/paths\/~1follow_up_statuses~1{type}{format}\/get)", "default": null, "nullable": true }, "bn1": { "type": "string", "description": "value for the bn1" }, "bn1_label": { "type": "string", "description": "label for the bn1 depends on the country like `Tax ID number` OR `Business number`" }, "bn2_label": { "type": "string", "description": "label for the bn2 depends on the country like `Tax ID number` OR `Business number`" }, "bn2": { "type": "string", "description": "value for the bn2" } }, "required": [ "supplier_number", "first_name", "last_name", "email", "password" ] }, "Product": { "type": "object", "properties": { "Product": { "$ref": "#\/components\/schemas\/ProductBase" } } }, "ProductBase": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "description": "Unique identifier", "readOnly": true }, "staff_id": { "type": "integer", "format": "int64", "description": "Staff ID who created the product get it from [GET STAFF API](#tag\/Staff) if it's `0` that means the site owner is the staff that created it", "example": 0, "default": 0 }, "name": { "type": "string", "maxLength": "255", "description": "Name of the product" }, "description": { "type": "string", "description": "Description of the product" }, "unit_price": { "type": "number", "format": "double", "description": "Price of 1 unit of this product" }, "tax1": { "type": "integer", "format": "int32", "description": "First Tax ID get it from [GET Taxes API](#tag\/Taxes)" }, "tax2": { "type": "integer", "format": "int32", "description": "Second Tax ID get it from [GET Taxes API](#tag\/Taxes)" }, "supplier_id": { "type": "integer", "format": "int32", "description": "Supplier REF#, you can get it through the [GET Taxes API](#tag\/Suppliers)" }, "brand": { "type": "string", "maxLength": "255", "description": "Brand \u00ae name of the product" }, "category": { "type": "string", "maxLength": "255", "description": "Category of the product", "deprecated": true }, "tags": { "type": "string", "description": "Tags for the product ( comma separated string values ex: tag1 , tag2, .. )" }, "buy_price": { "type": "number", "format": "double", "description": "Buy price of the product" }, "product_code": { "type": "string", "maxLength": "255", "description": "Numberic code for the product" }, "track_stock": { "type": "boolean", "description": "0\/1 if to track the stock of product (Must have Inventory plugin active)." }, "stock_balance": { "type": "number", "format": "double", "description": "Initial stock balance" }, "low_stock_thershold": { "type": "integer", "format": "int32", "description": "Threshold before it notifies the user of low stock in inventory" }, "barcode": { "type": "string", "maxLength": "255", "description": "Barcode for the product" }, "notes": { "type": "string", "maxLength": "255", "description": "Notes for the product" }, "status": { "type": "integer", "description": "0 Active \/ 1 Inactive \/ 2 Suspended", "default": 0 }, "created": { "type": "string", "format": "date-time", "description": "Time of creation for the Category", "example": "2018-05-10 00:42:00", "readOnly": true }, "modified": { "type": "string", "format": "date-time", "description": "Last Time this Category was updated", "example": "2018-05-12 13:05:06", "readOnly": true }, "follow_up_status": { "type": "integer", "description": "Follow Up Status get it from [GET Follow up statuses with model product](#tag\/Follow-Up-Statuses\/paths\/~1follow_up_statuses~1{type}{format}\/get)", "default": null, "nullable": true }, "updated_price": { "type": "boolean", "description": "0\/1 if the price was updated or not" }, "average_price": { "type": "number", "format": "double", "description": "current active price" }, "type": { "type": "integer", "format": "int32", "description": "Type of the product.", "enum": [ "1 => Product", "2 => Service", "3 => Bundle" ], "default": null, "nullable": true }, "minimum_price": { "type": "number", "format": "double", "description": "Minimum price of the product", "nullble": true, "default": null }, "profit_margin": { "type": "number", "format": "double", "description": "Profit margin of the product", "nullble": true, "default": null }, "discount": { "type": "number", "format": "double", "description": "discount amount", "nullble": true, "default": null }, "discount_type": { "type": "integer", "description": "discount type", "enum": [ "1 => Percentage", "2 => Absolute" ], "nullble": true, "default": null }, "duration_minutes": { "type": "number", "format": "double", "description": "time of service", "default": 0 }, "availabe_online": { "type": "boolean", "description": "0\/1 if the priduct is available online or not.", "default": 0 }, "raw_store_id": { "type": "integer", "format": "int64", "description": "The store which the items of the bundle get it from [GET STORE API](#tag\/Stores)", "example": 0, "default": null, "nullable": true } } }, "ClientAppointment": { "type": "object", "properties": { "FollowUpReminder": { "$ref": "#\/components\/schemas\/AppointmentBase" } } }, "InvoiceAppointment": { "type": "object", "properties": { "InvoiceAppointment": { "$ref": "#\/components\/schemas\/AppointmentBase" } } }, "EstimateAppointment": { "type": "object", "properties": { "EstimateAppointment": { "$ref": "#\/components\/schemas\/AppointmentBase" } } }, "WorkOrderAppointment": { "type": "object", "properties": { "WorkOrderAppointment": { "$ref": "#\/components\/schemas\/AppointmentBase" } } }, "AppointmentBase": { "type": "object", "properties": { "id": { "type": "integer", "format": "int32", "description": "Unique identifier", "readOnly": true }, "item_type": { "type": "integer", "format": "int32", "description": "Type of the appointment.", "enum": [ "CLIENT => 1", "INVOICE => 2", "ESTIMATE => 3", "PO => 4", "STAFF => 5", "SUPPLIER => 6", "PRODUCT => 7", "WORK_ORDER => 8", "APPOINTMENT => 9", "SHIFT => 10", "BOOKING => 11" ], "readOnly": true }, "item_id": { "type": "integer", "format": "int32", "description": "Ref # of the id for that item ex:( if the it is client_appointment then item_id should be client_id )" }, "staff_id": { "type": "integer||array", "format": "int32", "description": "Staff user submitting the request get it from [GET STAFF API](#tag\/Staff) if it's `0` that means the site owner is the staff that created it", "enum": [ "if it is integer then this points to the staff who created the appointment", "if it is array then this points to the assigned staffs and the staff who created the appointment will be the system" ] }, "date": { "type": "string", "format": "date-time", "description": "date of the appointment" }, "end_date": { "type": "string", "format": "date-time", "description": "end date of the appointment", "nullable": true }, "body": { "type": "string", "description": "Text body for the appointment" }, "action_id": { "type": "integer", "format": "int32", "description": "Action to be performed get it from [GET Follow Up Actions API with the appointment type`](#tag\/Follow-Up-Actions\/paths\/~1follow_up_actions~1{type}{format}\/get)" }, "status": { "type": "integer", "format": "int32", "description": "Status of current appointment status", "enum": [ "0 => Scheduled", "1 => Done", "2 => Dismissed" ], "default": 0 }, "status_date": { "type": "string", "format": "date-time", "description": "When the status was updated to the current state." }, "post_id": { "type": "integer", "format": "int32", "description": "Post REF#, you can get it through the [Notes API](#tag\/Notes) if equals 0 then it has no post", "default": 0 }, "recurring": { "type": "boolean", "description": "0\/1 indicates whether this appointment is repeated or not", "enum": [ "0 => not repeated", "1 => repeated" ], "writeOnly": true, "default": 0 }, "recurring_appointment_id": { "type": "integer", "format": "int32", "description": "recurring REF#", "readOnly": true }, "created": { "type": "string", "format": "date-time", "description": "Time of creation for the appointment", "readOnly": true }, "modified": { "type": "string", "format": "date-time", "description": "Last Time this appointment was updated", "readOnly": true }, "partner_type": { "type": "integer", "format": "int32", "description": "Type of the appointment partner.", "enum": [ "CLIENT => 1" ] }, "partner_id": { "type": "integer", "format": "int32", "description": "Ref # of the appointment partner id ex:( if the partner then partner_id should be client_id )" }, "share_with_partner": { "type": "boolean", "description": "0\/1 indicates whether this appointment is shared with the partner or not", "default": 0 } }, "required": [ "date", "item_id", "partner_type", "partner_id" ] }, "ClientPayment": { "type": "object", "properties": { "ClientPayment": { "type": "object", "properties": { "client_id": { "type": "integer", "format": "int32", "description": "Client REF#, you can get it through the Clients API" }, "status": { "type": "integer", "format": "int32", "description": "Status of payment" }, "payment_method": { "type": "string", "maxLength": "100", "description": "Method of payment" }, "amount": { "type": "number", "format": "double", "description": "Amount paid" }, "currency_code": { "type": "string", "maxLength": "10", "description": "Currency Code", "example": "USD" }, "transaction_id": { "type": "string", "maxLength": "100", "description": "Visual identifier for the process" }, "treasury_id": { "type": "integer", "maxLength": "100", "description": "Treasury Ref get it from [GET Treasuries](#tag\/Treasuries)" }, "date": { "type": "string", "format": "date-time", "description": "Date of the payment", "example": "2025-04-29 13:21:05" }, "staff_id": { "type": "integer", "format": "int32", "description": "Staff user submitting the request get it from [GET STAFF API](#tag\/Staff) if it's `0` that means the site owner is the staff that created it" }, "notes": { "type": "string", "description": "Notes for payment" }, "receipt_notes": { "type": "string", "description": "Notes for receipt" } } } }, "required": [ "client_id", "status", "payment_method", "date", "amount", "currency_code" ] }, "InvoicePayment": { "type": "object", "properties": { "InvoicePayment": { "$ref": "#\/components\/schemas\/PaymentBase" } } }, "PurchaseOrderPayment": { "type": "object", "properties": { "PurchaseOrderPayment": { "$ref": "#\/components\/schemas\/PurchaseOrderBasePayment" } } }, "PurchaseOrderTax": { "type": "object", "properties": { "PurchaseOrderTax": { "$ref": "#\/components\/schemas\/TaxBase" } } }, "Payment": { "type": "object", "properties": { "Payment": { "$ref": "#\/components\/schemas\/SamplePaymentBase" } } }, "SamplePaymentBase": { "type": "object", "properties": { "payment_method": { "type": "string", "maxLength": "100", "description": "Method of payment" }, "amount": { "type": "number", "format": "double", "description": "Amount paid" }, "transaction_id": { "type": "string", "maxLength": "100", "description": "Visual identifier for the process" }, "treasury_id": { "type": "integer", "maxLength": "100", "description": "Treasury Ref get it from [GET Treasuries](#tag\/Treasuries)" }, "date": { "type": "string", "format": "date-time", "description": "Date of the payment", "example": "2025-04-29 13:21:05" }, "staff_id": { "type": "integer", "format": "int32", "description": "Staff user submitting the request get it from [GET STAFF API](#tag\/Staff) if it's `0` that means the site owner is the staff that created it" } } }, "PaymentBase": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "description": "Unique identifier", "readOnly": true }, "invoice_id": { "type": "integer", "format": "int64", "description": "Invoice REF#, you can get it through the Invoices API" }, "payment_method": { "type": "string", "maxLength": "100", "description": "Method of payment" }, "amount": { "type": "number", "format": "double", "description": "Amount paid" }, "transaction_id": { "type": "string", "maxLength": "100", "description": "Visual identifier for the process" }, "treasury_id": { "type": "integer", "maxLength": "100", "description": "Treasury Ref get it from [GET Treasuries](#tag\/Treasuries)" }, "date": { "type": "string", "format": "date-time", "description": "date of the payment" }, "email": { "type": "string", "maxLength": "255", "description": "Optional Email" }, "status": { "type": "integer", "format": "int32", "description": "Status of the payment 0=>failded, 1=>completed , 2=>pending, 3=>not completed" }, "notes": { "type": "string", "description": "Notes for payment" }, "response_code": { "type": "string", "description": "Response code of the API called ex:(stripe , paypal , .. )" }, "response_message": { "type": "string", "description": "Response message of the API called ex:(stripe , paypal , .. )" }, "created": { "type": "string", "format": "date-time", "description": "Time of creation for the client" }, "modified": { "type": "string", "format": "date-time", "description": "Last Time this Payment was updated" }, "currency_code": { "type": "string", "maxLength": "3", "description": "3 Digit currency code following ISO 4217 standard" }, "first_name": { "type": "string", "maxLength": "255", "description": "First Name (Extra Info)" }, "last_name": { "type": "string", "maxLength": "255", "description": "Last name (Extra Info)" }, "address1": { "type": "string", "maxLength": "255", "description": "Address line 1 (Extra Info)" }, "address2": { "type": "string", "maxLength": "255", "description": "Address line 2 (Extra Info)" }, "city": { "type": "string", "maxLength": "255", "description": "City (Extra Info)" }, "state": { "type": "string", "maxLength": "100", "description": "State (Extra Info)" }, "postal_code": { "type": "string", "maxLength": "10", "description": "Postal code (Extra Info)" }, "country_code": { "type": "string", "maxLength": "3", "description": "Country ISO \"ALPHA-2\" Code (Extra Info)" }, "phone1": { "type": "string", "maxLength": "50", "description": "Phone number (Extra Info)" }, "phone2": { "type": "string", "maxLength": "50", "description": "Mobile number (Extra Info)" }, "transaction_type": { "type": "string", "maxLength": "255", "description": "!!" }, "processed": { "type": "boolean", "description": "0\/1 if the payment is processed" }, "attachment": { "type": "string", "maxLength": "255", "description": "Link for the attachment" }, "staff_id": { "type": "integer", "format": "int32", "description": "Staff user submitting the request get it from [GET STAFF API](#tag\/Staff) if it's `0` that means the site owner is the staff that created it" }, "receipt_notes": { "type": "string", "description": "Notes for the receipt . " } }, "required": [ "invoice_id", "payment_method", "amount" ] }, "PurchaseOrderBasePayment": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "description": "Unique identifier", "readOnly": true }, "purchase_order_id": { "type": "integer", "format": "int64", "description": "Invoice REF#, you can get it through the Invoices API" }, "payment_method": { "type": "string", "maxLength": "100", "description": "Method of payment" }, "amount": { "type": "number", "format": "double", "description": "Amount paid" }, "transaction_id": { "type": "string", "maxLength": "100", "description": "Visual identifier for the process" }, "treasury_id": { "type": "integer", "maxLength": "100", "description": "Treasury Ref get it from [GET Treasuries](#tag\/Treasuries)" }, "date": { "type": "string", "format": "date-time", "description": "date of the payment" }, "email": { "type": "string", "maxLength": "255", "description": "Optional Email" }, "status": { "type": "integer", "format": "int32", "description": "Status of the payment 0=>failded, 1=>completed , 2=>pending, 3=>not completed" }, "notes": { "type": "string", "description": "Notes for payment" }, "response_code": { "type": "string", "description": "Response code of the API called ex:(stripe , paypal , .. )" }, "response_message": { "type": "string", "description": "Response message of the API called ex:(stripe , paypal , .. )" }, "created": { "type": "string", "format": "date-time", "description": "Time of creation for the client" }, "modified": { "type": "string", "format": "date-time", "description": "Last Time this Payment was updated" }, "currency_code": { "type": "string", "maxLength": "3", "description": "3 Digit currency code following ISO 4217 standard" }, "first_name": { "type": "string", "maxLength": "255", "description": "First Name (Extra Info)" }, "last_name": { "type": "string", "maxLength": "255", "description": "Last name (Extra Info)" }, "address1": { "type": "string", "maxLength": "255", "description": "Address line 1 (Extra Info)" }, "address2": { "type": "string", "maxLength": "255", "description": "Address line 2 (Extra Info)" }, "city": { "type": "string", "maxLength": "255", "description": "City (Extra Info)" }, "state": { "type": "string", "maxLength": "100", "description": "State (Extra Info)" }, "postal_code": { "type": "string", "maxLength": "10", "description": "Postal code (Extra Info)" }, "country_code": { "type": "string", "maxLength": "3", "description": "Country ISO \"ALPHA-2\" Code (Extra Info)" }, "phone1": { "type": "string", "maxLength": "50", "description": "Phone number (Extra Info)" }, "phone2": { "type": "string", "maxLength": "50", "description": "Mobile number (Extra Info)" }, "transaction_type": { "type": "string", "maxLength": "255", "description": "!!" }, "processed": { "type": "boolean", "description": "0\/1 if the payment is processed" }, "attachment": { "type": "string", "maxLength": "255", "description": "Link for the attachment" }, "staff_id": { "type": "integer", "format": "int32", "description": "Staff user submitting the request get it from [GET STAFF API](#tag\/Staff) if it's `0` that means the site owner is the staff that created it" }, "receipt_notes": { "type": "string", "description": "Notes for the receipt . " } }, "required": [ "invoice_id", "payment_method", "amount" ] }, "Income": { "type": "object", "properties": { "Income": { "$ref": "#\/components\/schemas\/ExpenseBase" } } }, "Expense": { "type": "object", "properties": { "Expense": { "$ref": "#\/components\/schemas\/ExpenseBase" } } }, "ExpenseBase": { "type": "object", "properties": { "id": { "type": "integer", "format": "int32", "description": "Unique identifier" }, "amount": { "type": "number", "format": "double", "description": "Expense amount" }, "currency_code": { "type": "string", "maxLength": "100", "description": "3 Digit currency code following ISO 4217 standard" }, "vendor": { "type": "string", "maxLength": "200", "description": "(optional)Vendor name" }, "category": { "type": "string", "maxLength": "200", "description": "Category name" }, "date": { "type": "string", "format": "date", "description": "date of the expense" }, "file": { "type": "string", "maxLength": "200", "description": "Link to the uploaded file" }, "note": { "type": "string", "description": "Notes to the expense." }, "client_id": { "type": "integer", "format": "int32", "description": "Client REF#, you can get it through the Clients API" }, "tax1_id": { "type": "integer", "format": "int32", "description": "First tax Ref #" }, "tax1_name": { "type": "string", "maxLength": "255", "description": "First tax name" }, "tax1_value": { "type": "number", "format": "float", "description": "First tax value" }, "tax1_amount": { "type": "number", "format": "double", "description": "First tax amount" }, "tax1_included": { "type": "boolean", "description": "0\/1 if the first tax is included in the expense amount or not ." }, "tax2_id": { "type": "integer", "format": "int32", "description": "Second tax Ref #" }, "tax2_name": { "type": "string", "maxLength": "255", "description": "Second tax name" }, "tax2_value": { "type": "number", "format": "float", "description": "Second tax value" }, "tax2_amount": { "type": "number", "format": "double", "description": "Second tax amount" }, "tax2_included": { "type": "boolean", "description": "0\/1 if the second tax is included in the expense amount or not ." }, "is_income": { "type": "boolean", "description": "0\/1 indicating if it is an income or not " }, "attachments": { "type": "array", "description": "contains urls of s3 attachments", "example": "[\r\n 'https:\/\/s3.eu-west-1.amazonaws.com\/daftra.local\/files\/9c3832a8\/expense\/d5912439-52dc-4385-a2e5-06bc9176e8bb.png?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAXJXESINN22IBY4MO%2F20230515%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20230515T101647Z&X-Amz-SignedHeaders=host&X-Amz-Expires=6000&X-Amz-Signature=a804d6a4070f36cc4f2c7a06e76b6b5d6050dd918ffa14ac5458be6efebc0e07',\r\n 'https:\/\/s3.eu-west-1.amazonaws.com\/daftra.local\/files\/9c3832a8\/expense\/f75922d3-b5a1-4a7c-a174-3b9a4a960c08.png?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAXJXESINN22IBY4MO%2F20230515%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20230515T101647Z&X-Amz-SignedHeaders=host&X-Amz-Expires=6000&X-Amz-Signature=ea4189619af49a92d9b98c3e98695225e55912376e0586977a99f413a286b972'\r\n ]" } } }, "Note": { "type": "object", "properties": { "Note": { "$ref": "#\/components\/schemas\/NoteBase" } } }, "NoteBase": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "description": "Unique identifier" }, "item_type": { "type": "integer", "format": "int32", "description": "Type of the post ( 1 for client appointment )." }, "item_id": { "type": "integer", "format": "int32", "description": "Ref # of the id for that type ex:( if the item_type = 1 then item_id should be client_id )" }, "date": { "type": "string", "format": "date-time", "description": "Date of the post" }, "staff_id": { "type": "integer", "format": "int32", "description": "Staff user submitting the request get it from [GET STAFF API](#tag\/Staff) if it's `0` that means the site owner is the staff that created it" }, "body": { "type": "string", "description": "Text body of the post( can contain HTML )" }, "action_id": { "type": "integer", "format": "int32", "description": "Action Ref #" }, "status_id": { "type": "integer", "format": "int32", "description": "Status Ref # of the post " } } }, "InvoiceItem": { "type": "object", "properties": { "InvoiceItem": { "type": "object", "properties": { "id": { "type": "integer", "description": "Invoice Item ID", "readOnly": true }, "invoice_id": { "type": "integer", "description": "Invoice Ref #" }, "item": { "type": "string", "description": "Name of the product" }, "description": { "type": "string", "description": "Description of the item" }, "unit_price": { "type": "number", "format": "double", "description": "Unit price of the item" }, "quantity": { "type": "integer", "format": "int32", "description": "Quantity of the item in the order" }, "tax1": { "type": "integer", "description": "Tax 1 id applied on this item get if from [GET Taxes](#tag\/Taxes)" }, "tax2": { "type": "integer", "description": "Tax 2 id applied on this item get if from [GET Taxes](#tag\/Taxes)" }, "summary_tax1": { "type": "number", "format": "double", "description": "Tax 1 calculated amount applied on this item", "readOnly": true }, "summary_tax2": { "type": "number", "format": "double", "description": "Tax 2 calculated amount applied on this item", "readOnly": true }, "subtotal": { "type": "number", "format": "double", "description": "total price of the product without taxes", "readOnly": true }, "product_id": { "type": "integer", "format": "int32", "description": "Product Ref # get it from [GET Products](#tag\/Products)" }, "col_3": { "type": "string", "description": "additional data to be appear in the invoice layout", "default": null, "nullable": true }, "col_4": { "type": "string", "description": "additional data to be appear in the invoice layout", "default": null, "nullable": true }, "col_5": { "type": "string", "description": "additional data to be appear in the invoice layout", "default": null, "nullable": true }, "created": { "type": "string", "format": "date-time", "description": "Time of creation for this item", "example": "2018-05-10 00:42:00", "readOnly": true }, "modified": { "type": "string", "format": "date-time", "description": "Last Time this item was updated", "example": "2018-05-12 13:05:06", "readOnly": true }, "discount": { "type": "number", "format": "double", "description": "discount amount" }, "discount_type": { "type": "integer", "description": "discount type", "enum": [ "1 => Percentage", "2 => Absolute" ] }, "store_id": { "type": "integer", "format": "int64", "description": "The store which this item belongs to get it from [GET STORE API](#tag\/Stores) if it's not set the invoice store is used", "example": 0, "default": "The invoice store id" }, "calculated_discount": { "type": "number", "format": "double", "description": "total applied discount on this item", "readOnly": true } }, "required": [ "invoice_id", "product_id", "quantity", "unit_price" ] } } }, "Tax": { "type": "object", "properties": { "Tax": { "$ref": "#\/components\/schemas\/TaxBase" } } }, "TaxBase": { "type": "object", "properties": { "id": { "type": "integer", "description": "Invoice Item ID", "readOnly": true }, "tax_id": { "type": "integer", "description": "Tax ID", "readOnly": true }, "name": { "type": "string", "description": "Name of the Tax" }, "value": { "type": "number", "format": "double", "description": "the percentage of the tax" }, "description": { "type": "string", "description": "Description of the tax" }, "included": { "type": "boolean", "enum": [ "null\/0 => exclusive tax which means that the product price does not include the tax", "1 => inclusive tax which means that the product price includes the tax" ], "default": 0 }, "created": { "type": "string", "format": "date-time", "description": "Time of creation for this item", "example": "2018-05-10 00:42:00", "readOnly": true }, "modified": { "type": "string", "format": "date-time", "description": "Last Time this item was updated", "example": "2018-05-12 13:05:06", "readOnly": true } }, "required": [ "name", "value" ] }, "WorkOrder": { "type": "object", "properties": { "WorkOrder": { "$ref": "#\/components\/schemas\/WorkOrderBase" } } }, "WorkOrderBase": { "type": "object", "properties": { "id": { "type": "integer", "description": "Invoice Item ID", "readOnly": true }, "client_id": { "type": "integer", "format": "int64", "description": "The client id get it from [GET Client API](#tag\/Clients)", "example": 15 }, "number": { "type": "string", "description": "Work Order Number this is auto generated but can be overwritten" }, "title": { "type": "string", "description": "Title" }, "start_date": { "type": "string", "format": "date", "description": "start Date" }, "description": { "type": "string", "description": "Description" }, "delivery_date": { "type": "string", "format": "date", "description": "Delivery Date" }, "delivery_appointment_id": { "type": "integer", "description": "Appointment Ref #" }, "follow_up_status_id": { "type": "integer", "description": "Follow Up Status get it from [GET Follow up statuses with model work_order](#tag\/Follow-Up-Statuses\/paths\/~1follow_up_statuses~1{type}{format}\/get)", "default": null, "nullable": true }, "budget": { "type": "number", "format": "double", "description": "budget amount of this work order" }, "budget_currency": { "type": "string", "description": "3 Digit currency code following ISO 4217 standard " }, "status": { "type": "integer", "description": "work order status", "enum": [ "1=>Open", "2=>Closed", "3=>Cancelled", "4=>Draft" ] }, "created": { "type": "string", "format": "date-time", "description": "Time of creation for this item", "example": "2018-05-10 00:42:00", "readOnly": true }, "modified": { "type": "string", "format": "date-time", "description": "Last Time this item was updated", "example": "2018-05-12 13:05:06", "readOnly": true }, "staff_id": { "type": "integer", "format": "int64", "description": "Staff ID who created the invoice get it from [GET STAFF API](#tag\/Staff) if it's `0` that means the site owner is the staff that created it", "example": 0, "default": 0 } }, "required": [ "start_date", "title" ] }, "ProductCategory": { "type": "object", "properties": { "ProductCategory": { "$ref": "#\/components\/schemas\/CategoryBase" } } }, "CategoryBase": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "description": "Unique identifier", "readOnly": true }, "name": { "type": "string", "maxLength": "255", "description": "Name of the product" }, "description": { "type": "string", "description": "Description of the product" }, "category_type": { "type": "integer", "format": "int64", "description": "Category Type", "enum": [ "1=> Products' Category", "2=> POS Shifts", "3=> POS Devices" ], "example": 1 }, "parent_id": { "type": "integer", "format": "int32", "description": "Parent Category REF#, you can get it through the [GET Categories API](#tag\/Categories)" }, "image": { "type": "string", "description": "Image name of the category" }, "created": { "type": "string", "format": "date-time", "description": "Time of creation for the Category", "example": "2018-05-10 00:42:00", "readOnly": true }, "modified": { "type": "string", "format": "date-time", "description": "Last Time this Category was updated", "example": "2018-05-12 13:05:06", "readOnly": true }, "image_full_path": { "type": "string", "description": "Full path of the image category" } } }, "ProductImage": { "type": "object", "properties": { "ProductImage": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "description": "Unique identifier", "readOnly": true }, "product_id": { "type": "integer", "format": "int32", "description": "Product REF#" }, "default": { "type": "boolean", "description": "0\/1 if this is the default image or not" }, "file": { "type": "string", "description": "Image name" }, "created": { "type": "string", "format": "date-time", "description": "Time of creation for the Category", "example": "2018-05-10 00:42:00", "readOnly": true }, "modified": { "type": "string", "format": "date-time", "description": "Last Time this Category was updated", "example": "2018-05-12 13:05:06", "readOnly": true }, "file_full_path": { "type": "string", "description": "Full path of the image" } } } } }, "Store": { "type": "object", "properties": { "Store": { "$ref": "#\/components\/schemas\/StoreBase" } } }, "StoreBase": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "description": "Unique identifier", "readOnly": true }, "name": { "type": "string", "maxLength": "255", "description": "Name of the store" }, "shipping_address": { "type": "string", "description": "shipping address of the store", "nullable": true, "default": null }, "primary": { "type": "boolean", "description": "0\/1 if this is the primary store or not" }, "active": { "type": "boolean", "description": "0\/1 if this is active or not" }, "created": { "type": "string", "format": "date-time", "description": "Time of creation for the Category", "example": "2018-05-10 00:42:00", "readOnly": true }, "modified": { "type": "string", "format": "date-time", "description": "Last Time this Category was updated", "example": "2018-05-12 13:05:06", "readOnly": true } }, "required": [ "name" ] }, "Treasury": { "type": "object", "properties": { "Treasury": { "$ref": "#\/components\/schemas\/TreasuryBase" } } }, "TreasuryBase": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "description": "Unique identifier", "readOnly": true }, "staff_id": { "type": "integer", "format": "int64", "description": "Staff ID who created the invoice get it from [GET STAFF API](#tag\/Staff) if it's `0` that means the site owner is the staff that created it", "example": 0, "default": 0 }, "name": { "type": "string", "maxLength": "255", "description": "Name of the treasury" }, "type": { "type": "integer", "format": "int64", "description": "treasury type", "enum": [ "1 => Bank", "3 => Treasury" ], "example": 3 }, "type_name": { "type": "string", "description": "account name of the bank ```Used in Bank type only```", "nullable": true, "default": null }, "type_account_number": { "type": "string", "description": "account number of the bank ```Used in Bank type only```", "nullable": true, "default": null }, "active": { "type": "boolean", "description": "0\/1 if this is active or not" }, "is_primary": { "type": "boolean", "description": "0\/1 if this is the primary treasury or not" }, "description": { "type": "string", "description": "Description of the treasury" }, "created": { "type": "string", "format": "date-time", "description": "Time of creation for the Category", "example": "2018-05-10 00:42:00", "readOnly": true }, "modified": { "type": "string", "format": "date-time", "description": "Last Time this Category was updated", "example": "2018-05-12 13:05:06", "readOnly": true }, "balance": { "type": "number", "format": "double", "description": "treasury current balance", "nullable": true, "default": null, "readOnly": true } }, "required": [ "name", "type" ] }, "Journal": { "type": "object", "properties": { "Journal": { "$ref": "#\/components\/schemas\/JournalBase" } } }, "JournalBase": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "description": "Unique identifier", "readOnly": true }, "number": { "type": "string", "maxLength": "255", "description": "Journal number, this field is auto generated but can be overridden", "example": "0700000AAAAA0001", "nullable": true }, "staff_id": { "type": "integer", "format": "int64", "description": "Staff ID who created the Journal get it from [GET STAFF API](#tag\/Staff) if it's `0` that means the site owner is the staff that created it", "example": 0, "default": 0 }, "date": { "type": "string", "format": "date", "description": "Time of journal", "example": "2018-05-10 00:42:00", "readOnly": true }, "name": { "type": "string", "maxLength": "255", "description": "Name of the treasury" }, "entity_type": { "type": "string", "description": "entity type which this journal follows", "enum": [ "invoice", "refund_receipt", "credit_note", "purchase_order", "purchase_refund", "invoice_sales_cost", "expense", "income", "invoice_payment", "purchase_order_payment", "stock_transaction", "stock_transfer", "treasury_transfer", "treasury_transfer_from", "treasury_transfer_to", "asset", "asset_deprecation", "asset_operation", "requisition" ] }, "entity_id": { "type": "string", "description": "the id of the item of the entity type" }, "is_automatic": { "type": "boolean", "description": "0\/1 if this was generated automatically or not" }, "description": { "type": "string", "description": "Description of the journal" }, "total_debit": { "type": "number", "format": "double", "description": "total debit of the journal, should always be equal to `total_credit`" }, "total_credit": { "type": "number", "format": "double", "description": "total credit of the journal, should always be equal to `total_debit`" }, "currency_code": { "type": "string", "maxLength": "3", "description": "Currency Code", "example": "USD" }, "currency_credit": { "type": "number", "format": "double", "description": "total credit in the local currency of the credit" }, "currency_debit": { "type": "number", "format": "double", "description": "total debit in the local currency of the debit" }, "alter_description": { "type": "string", "description": "Alter description of the journal" }, "created": { "type": "string", "format": "date-time", "description": "Time of creation for the Journal", "example": "2018-05-10 00:42:00", "readOnly": true }, "modified": { "type": "string", "format": "date-time", "description": "Last Time this Journal was updated", "example": "2018-05-12 13:05:06", "readOnly": true } }, "required": [ "entity_type", "entity_id", "total_debit", "total_credit", "currency_code", "description" ] }, "JournalTransaction": { "type": "object", "properties": { "JournalTransaction": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "description": "Unique identifier", "readOnly": true }, "journal_id": { "type": "string", "maxLength": "255", "description": "Journal REF #", "example": "11101", "readOnly": true }, "debit": { "type": "number", "format": "double", "description": "total debit of the account" }, "credit": { "type": "number", "format": "double", "description": "total credit of the account" }, "currency_debit": { "type": "number", "format": "double", "description": "total debit in the local currency of the debit" }, "currency_credit": { "type": "number", "format": "double", "description": "total credit in the local currency of the credit" }, "currency_code": { "type": "string", "maxLength": "3", "description": "Currency Code", "example": "USD" }, "currency_rate": { "type": "number", "format": "double", "description": "currency conversion rate" }, "subkey": { "type": "string", "description": "transaction sub-key", "enum": [ "client", "supplier", "income_tax", "outcome_tax", "treasury", "store", "income_category", "expense_category", "asset", "asset_deprecation", "asset_deprecation_expense", "staff_petty_cash" ] }, "description": { "type": "string", "description": "Description of the journal transaction" }, "journal_account_id": { "type": "string", "description": "Journal Account REF #" }, "alter_description": { "type": "string", "description": "Alter description of the journal" }, "created": { "type": "string", "format": "date-time", "description": "Time of creation for the Account", "example": "2018-05-10 00:42:00", "readOnly": true }, "modified": { "type": "string", "format": "date-time", "description": "Last Time this Account was updated", "example": "2018-05-12 13:05:06", "readOnly": true } }, "required": [ "journal_id", "debit", "credit" ] } } }, "JournalAccount": { "type": "object", "properties": { "JournalAccount": { "$ref": "#\/components\/schemas\/JournalAccountBase" } } }, "JournalAccountBase": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "description": "Unique identifier", "readOnly": true }, "journal_cat_id": { "type": "string", "maxLength": "255", "description": "Journal Category REF #", "example": "11101" }, "code": { "type": "string", "maxLength": "255", "description": "Journal code", "example": "11101" }, "type": { "type": "string", "description": "account type", "enum": [ "0", "1" ] }, "staff_id": { "type": "integer", "format": "int64", "description": "Staff ID who created the account get it from [GET STAFF API](#tag\/Staff) if it's `0` that means the site owner is the staff that created it", "example": 0, "default": 0 }, "total_debit": { "type": "number", "format": "double", "description": "total debit of the account" }, "total_credit": { "type": "number", "format": "double", "description": "total credit of the account" }, "entity_type": { "type": "string", "description": "entity type which this journal follows", "enum": [ "client", "supplier", "income_tax", "outcome_tax", "treasury", "store", "income_category", "expense_category", "asset", "asset_deprecation", "asset_deprecation_expense", "staff_petty_cash" ] }, "entity_id": { "type": "string", "description": "the id of the item of the entity type" }, "name": { "type": "string", "maxLength": "255", "description": "Name of the treasury" }, "is_recalculated": { "type": "boolean", "description": "0\/1 if this was recalculated or not" }, "last_transaction_update": { "type": "string", "format": "date-time", "description": "Time of last transaction", "example": "2018-05-10 00:42:00", "readOnly": true }, "parent_cat_ids": { "type": "string", "description": "comma separated category ids", "example": "17,18" }, "disabled": { "type": "boolean", "description": "0\/1 if this is disabled or not" }, "created": { "type": "string", "format": "date-time", "description": "Time of creation for the Account", "example": "2018-05-10 00:42:00", "readOnly": true }, "modified": { "type": "string", "format": "date-time", "description": "Last Time this Account was updated", "example": "2018-05-12 13:05:06", "readOnly": true } }, "required": [ "name", "type" ] }, "JournalCat": { "type": "object", "properties": { "JournalCat": { "$ref": "#\/components\/schemas\/JournalCatBase" } } }, "JournalCatBase": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "description": "Unique identifier", "readOnly": true }, "code": { "type": "string", "maxLength": "255", "description": "Journal code", "example": "11101" }, "name": { "type": "string", "maxLength": "255", "description": "Name of the treasury" }, "is_recalculated": { "type": "boolean", "description": "0\/1 if this was recalculated or not" }, "last_transaction_update": { "type": "string", "format": "date-time", "description": "Time of last transaction", "example": "2018-05-10 00:42:00", "readOnly": true }, "entity_type": { "type": "string", "description": "entity type which this journal follows", "enum": [ "client", "supplier", "income_tax", "outcome_tax", "treasury", "store", "income_category", "expense_category", "asset", "asset_deprecation", "asset_deprecation_expense", "staff_petty_cash" ] }, "entity_id": { "type": "string", "description": "the id of the item of the entity type" }, "journal_cat_id": { "type": "string", "maxLength": "255", "description": "Journal Category REF #", "example": "11101" }, "parent_cat_ids": { "type": "string", "description": "comma separated category ids", "example": "17,18" }, "type": { "type": "string", "description": "account type", "enum": [ "0", "1" ] }, "staff_id": { "type": "integer", "format": "int64", "description": "Staff ID who created the account get it from [GET STAFF API](#tag\/Staff) if it's `0` that means the site owner is the staff that created it", "example": 0, "default": 0 }, "total_debit": { "type": "number", "format": "double", "description": "total debit of the category" }, "total_credit": { "type": "number", "format": "double", "description": "total credit of the category" }, "disabled": { "type": "boolean", "description": "0\/1 if this is disabled or not" }, "color": { "type": "string", "maxLength": "255", "description": "Color of the JournalCat", "default": "", "deprecated": true }, "created": { "type": "string", "format": "date-time", "description": "Time of creation for the Account", "example": "2018-05-10 00:42:00", "readOnly": true }, "modified": { "type": "string", "format": "date-time", "description": "Last Time this Account was updated", "example": "2018-05-12 13:05:06", "readOnly": true } }, "required": [ "name", "type" ] }, "StockTransaction": { "type": "object", "properties": { "StockTransaction": { "$ref": "#\/components\/schemas\/StockTransactionBase" } } }, "StockTransactionBase": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "description": "Unique identifier", "readOnly": true }, "product_id": { "type": "integer", "format": "int32", "description": "Product Ref # get it from [GET Products](#tag\/Products)" }, "transaction_type": { "type": "integer", "description": "transaction type", "enum": [ "1 => IN", "2 => OUT" ], "example": 3 }, "transaction_category_id": { "type": "integer", "description": "Transaction category Ref #", "deprecated": true, "nullable": true, "default": null }, "source_type": { "type": "integer", "description": "Source type", "enum": [ "1 => Manual", "2 => Invoice", "3 => Purchase Invoice", "4 => Credit Note", "5 => Transfer", "6 => Refund Receipt", "7 => Purchase Refund" ], "example": 2, "readOnly": true }, "date": { "type": "string", "format": "date-time", "description": "date of the transaction", "example": "2018-05-10 00:42:00" }, "order_id": { "type": "integer", "format": "int64", "description": "order REF # of the source so it's based of source type", "readOnly": true }, "ref_id": { "type": "integer", "format": "int64", "description": "item REF # ex: if the type is invoice this field will refer to the invoice item", "example": 12, "readOnly": true, "default": 0 }, "status": { "type": "integer", "description": "status", "enum": [ "1 => Draft", "2 => Pending", "4 => Processed", "5 => Transfer" ], "example": 4, "readOnly": true }, "received_date": { "type": "string", "format": "date-time", "description": "receive date of the transaction", "example": "2018-05-10 00:42:00", "readOnly": true }, "quantity": { "type": "integer", "format": "int32", "description": "Quantity of the item in the order" }, "currency_code": { "type": "string", "maxLength": "10", "description": "Currency Code", "example": "USD" }, "price": { "type": "number", "format": "double", "description": "price of the item" }, "price_without_tax": { "type": "number", "format": "double", "description": "price of the item without tax" }, "added_by": { "type": "integer", "format": "int64", "description": "Staff ID who created the invoice get it from [GET STAFF API](#tag\/Staff) if it's `0` that means the site owner is the staff that created it", "example": 0, "default": 0 }, "ignored": { "type": "boolean", "description": "0\/1 if this is ignored or not" }, "ignored_date": { "type": "string", "format": "date-time", "description": "ignored date of the transaction", "example": "2018-05-10 00:42:00", "readOnly": true }, "balance_to_date": { "type": "number", "format": "double", "description": "current balance", "default": 0, "readOnly": true }, "notes": { "type": "string", "description": "notes of the transaction", "nullable": true, "default": null }, "stock_transfer_id": { "type": "integer", "format": "int64", "description": "transfer REF # if transaction_type is transfer" }, "store_id": { "type": "integer", "format": "int64", "description": "The store which this item belongs to get it from [GET STORE API](#tag\/Stores) if it's not set the invoice store is used", "example": 0, "default": "The invoice store id" }, "description": { "type": "string", "description": "Description of the treasury" }, "created": { "type": "string", "format": "date-time", "description": "Time of creation for the Transaction", "example": "2018-05-10 00:42:00", "readOnly": true }, "modified": { "type": "string", "format": "date-time", "description": "Last Time this Transaction was updated", "example": "2018-05-12 13:05:06", "readOnly": true }, "discount": { "type": "number", "format": "double", "description": "discount amount" }, "purchase_price": { "type": "double", "description": "current purchase price of the product", "default": 0, "readOnly": true }, "purchase_order_ids": { "type": "string", "description": "purchase invoice ids", "default": 0, "readOnly": true, "deprecated": true }, "journal_account_id": { "type": "integer", "description": "journal account REF # get it from [GET Journal Accounts](#tag\/Journal-Accounts)", "default": 0, "readOnly": true, "deprecated": true }, "fetch_from_raw": { "type": "boolean", "description": "0\/1 to allow fetch from raw or not" } }, "required": [ "product_id", "store_id", "transaction_type" ] }, "InvoiceItemRef": { "type": "object", "properties": { "InvoiceItem": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer", "description": "Invoice Item ID", "readOnly": true }, "invoice_id": { "type": "integer", "description": "Invoice Ref #" }, "item": { "type": "string", "description": "Name of the product" }, "description": { "type": "string", "description": "Description of the item" }, "unit_price": { "type": "number", "format": "double", "description": "Unit price of the item" }, "quantity": { "type": "integer", "format": "int32", "description": "Quantity of the item in the order" }, "tax1": { "type": "integer", "description": "Tax 1 id applied on this item get if from [GET Taxes](#tag\/Taxes)" }, "tax2": { "type": "integer", "description": "Tax 2 id applied on this item get if from [GET Taxes](#tag\/Taxes)" }, "summary_tax1": { "type": "number", "format": "double", "description": "Tax 1 calculated amount applied on this item", "readOnly": true }, "summary_tax2": { "type": "number", "format": "double", "description": "Tax 2 calculated amount applied on this item", "readOnly": true }, "subtotal": { "type": "number", "format": "double", "description": "total price of the product without taxes", "readOnly": true }, "product_id": { "type": "integer", "format": "int32", "description": "Product Ref # get it from [GET Products](#tag\/Products)" }, "col_3": { "type": "string", "description": "additional data to be appear in the invoice layout", "default": null, "nullable": true }, "col_4": { "type": "string", "description": "additional data to be appear in the invoice layout", "default": null, "nullable": true }, "col_5": { "type": "string", "description": "additional data to be appear in the invoice layout", "default": null, "nullable": true }, "created": { "type": "string", "format": "date-time", "description": "Time of creation for this item", "example": "2018-05-10 00:42:00", "readOnly": true }, "modified": { "type": "string", "format": "date-time", "description": "Last Time this item was updated", "example": "2018-05-12 13:05:06", "readOnly": true }, "discount": { "type": "number", "format": "double", "description": "discount amount" }, "discount_type": { "type": "integer", "description": "discount type", "enum": [ "1 => Percentage", "2 => Absolute" ] }, "store_id": { "type": "integer", "format": "int64", "description": "The store which this item belongs to get it from [GET STORE API](#tag\/Stores) if it's not set the invoice store is used", "example": 0, "default": "The invoice store id" }, "calculated_discount": { "type": "number", "format": "double", "description": "total applied discount on this item", "readOnly": true } }, "required": [ "invoice_id", "product_id", "quantity", "unit_price" ] } } } }, "InvoicePaymentRef": { "type": "object", "properties": { "InvoicePayment": { "type": "array", "items": { "$ref": "#\/components\/schemas\/PaymentBase" } } } }, "InvoiceCustomField": { "type": "object", "properties": { "InvoiceCustomField": { "type": "object" } } }, "Deposit": { "type": "object", "properties": { "Deposit": { "type": "object" } } }, "InvoiceReminder": { "type": "object", "properties": { "InvoiceReminder": { "type": "object" } } }, "Document": { "type": "object", "properties": { "Document": { "type": "object" } } }, "DocumentTitle": { "type": "object", "properties": { "DocumentTitle": { "type": "object" } } }, "PaymentRef": { "type": "object", "properties": { "Payment": { "type": "array", "items": { "$ref": "#\/components\/schemas\/SamplePaymentBase" } } } }, "FollowUpReminder": { "type": "object", "properties": { "FollowUpReminder": { "type": "object" } } }, "ProductImageRef": { "type": "object", "properties": { "ProductImage": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "description": "Unique identifier", "readOnly": true }, "product_id": { "type": "integer", "format": "int32", "description": "Product REF#" }, "default": { "type": "boolean", "description": "0\/1 if this is the default image or not" }, "file": { "type": "string", "description": "Image name" }, "created": { "type": "string", "format": "date-time", "description": "Time of creation for the Category", "example": "2018-05-10 00:42:00", "readOnly": true }, "modified": { "type": "string", "format": "date-time", "description": "Last Time this Category was updated", "example": "2018-05-12 13:05:06", "readOnly": true }, "file_full_path": { "type": "string", "description": "Full path of the image" } } } } } }, "ProductCategoryRef": { "type": "object", "properties": { "ProductCategory": { "type": "array", "items": { "$ref": "#\/components\/schemas\/CategoryBase" } } } }, "JournalTransactionRef": { "type": "object", "properties": { "JournalTransaction": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "description": "Unique identifier", "readOnly": true }, "journal_id": { "type": "string", "maxLength": "255", "description": "Journal REF #", "example": "11101", "readOnly": true }, "debit": { "type": "number", "format": "double", "description": "total debit of the account" }, "credit": { "type": "number", "format": "double", "description": "total credit of the account" }, "currency_debit": { "type": "number", "format": "double", "description": "total debit in the local currency of the debit" }, "currency_credit": { "type": "number", "format": "double", "description": "total credit in the local currency of the credit" }, "currency_code": { "type": "string", "maxLength": "3", "description": "Currency Code", "example": "USD" }, "currency_rate": { "type": "number", "format": "double", "description": "currency conversion rate" }, "subkey": { "type": "string", "description": "transaction sub-key", "enum": [ "client", "supplier", "income_tax", "outcome_tax", "treasury", "store", "income_category", "expense_category", "asset", "asset_deprecation", "asset_deprecation_expense", "staff_petty_cash" ] }, "description": { "type": "string", "description": "Description of the journal transaction" }, "journal_account_id": { "type": "string", "description": "Journal Account REF #" }, "alter_description": { "type": "string", "description": "Alter description of the journal" }, "created": { "type": "string", "format": "date-time", "description": "Time of creation for the Account", "example": "2018-05-10 00:42:00", "readOnly": true }, "modified": { "type": "string", "format": "date-time", "description": "Last Time this Account was updated", "example": "2018-05-12 13:05:06", "readOnly": true } }, "required": [ "journal_id", "debit", "credit" ] } } } }, "staff": { "type": "object", "properties": { "staff": { "type": "object" } } }, "PurchaseOrderItemRef": { "type": "object", "properties": { "PurchaseOrderItem": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer", "description": "Purchase Order Item ID", "readOnly": true }, "product_id": { "type": "integer", "format": "int32", "description": "Product Ref #" }, "org_name": { "type": "string", "format": "", "description": "Name of the category that this item is following" }, "description": { "type": "string", "format": "", "description": "Description of the item" }, "unit_price": { "type": "number", "format": "double", "description": "Unit price of the item" }, "quantity": { "type": "integer", "format": "int32", "description": "Quantity of the item in the order" }, "tax1": { "type": "number", "format": "double", "description": "Tax 1 value applied on this item" }, "tax2": { "type": "number", "format": "double", "description": "Tax 2 value applied on this item " }, "purchase_order_id": { "type": "integer", "description": "Purchase Order Ref #" }, "item": { "type": "string", "description": "Name of the product" }, "summary_tax1": { "type": "number", "format": "double", "description": "Tax 1 calculated amount applied on this item", "readOnly": true }, "summary_tax2": { "type": "number", "format": "double", "description": "Tax 2 calculated amount applied on this item", "readOnly": true }, "subtotal": { "type": "number", "format": "double", "description": "total price of the product without taxes", "readOnly": true }, "col_3": { "type": "string", "description": "additional data to be appear in the Purchase Order layout", "default": null, "nullable": true }, "col_4": { "type": "string", "description": "additional data to be appear in the Purchase Order layout", "default": null, "nullable": true }, "col_5": { "type": "string", "description": "additional data to be appear in the Purchase Order layout", "default": null, "nullable": true }, "discount": { "type": "number", "format": "double", "description": "discount amount" }, "discount_type": { "type": "integer", "description": "discount type", "enum": [ "1 => Percentage", "2 => Absolute" ] }, "store_id": { "type": "integer", "format": "int64", "description": "The store which this item belongs to get it from [GET STORE API](#tag\/Stores) if it's not set the Purchase Order store is used", "example": 0, "default": "The Purchase Order store id" }, "calculated_discount": { "type": "number", "format": "double", "description": "total applied discount on this item", "readOnly": true }, "created": { "type": "string", "format": "date-time", "description": "Time of creation for this item", "example": "2018-05-10 00:42:00", "readOnly": true }, "modified": { "type": "string", "format": "date-time", "description": "Last Time this item was updated", "example": "2018-05-12 13:05:06", "readOnly": true } } } } } }, "PurchaseOrderTaxRef": { "type": "object", "properties": { "PurchaseOrderTax": { "type": "array", "items": { "$ref": "#\/components\/schemas\/TaxBase" } } } }, "PurchaseOrderCustomField": { "type": "object", "properties": { "PurchaseOrderCustomField": { "type": "object" } } }, "PurchaseOrderPaymentRef": { "type": "object", "properties": { "PurchaseOrderPayment": { "type": "array", "items": { "$ref": "#\/components\/schemas\/PurchaseOrderBasePayment" } } } }, "FollowUpAction": { "type": "object", "properties": { "FollowUpAction": { "type": "object" } } }, "FollowUpStatus": { "type": "object", "properties": { "FollowUpStatus": { "type": "object" } } } }, "responses": { "ValidationErrors": { "description": "Bad Request", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "result": { "type": "string", "example": "failed" }, "code": { "type": "integer", "example": 400 }, "message": { "type": "string", "example": "Bad Request" }, "validation_errors": { "type": "object", "properties": { "Attribute that caused the error": { "type": "string", "example": "Reason of the error" } } } } } } } }, "InternalServerError": { "description": "Internal Server Error", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "result": { "type": "string", "example": "failed" }, "code": { "type": "integer", "example": 500 }, "message": { "type": "string", "example": "Internal Server Error" } } } } } }, "TransactionFound": { "description": "Item can't be deleted, check the the transactions of the item", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "result": { "type": "string", "example": "failed" }, "code": { "type": "integer", "example": 400 }, "message": { "type": "string", "example": "Can't delete item. Remove its transactions first." } } } } } }, "Unauthorized": { "description": "Unauthorized", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "result": { "type": "string", "example": "failed" }, "code": { "type": "integer", "example": 401 }, "message": { "type": "string", "example": "Unauthorized" } } } } } }, "Forbidden": { "description": "Forbidden", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "result": { "type": "string", "example": "failed" }, "code": { "type": "integer", "example": 403 }, "message": { "type": "string", "example": "Forbidden" } } } } } }, "NotFound": { "description": "NotFound", "headers": [], "content": { "application\/json": { "schema": { "type": "object", "properties": { "result": { "type": "string", "example": "failed" }, "code": { "type": "integer", "example": 404 }, "message": { "type": "string", "example": "Item not found" } } } } } } }, "securitySchemes": { "APIKEY": { "description": "When you try to access the api from external domain. you can generate API keys, and delete API keys by going to your homepage then from the menu open settings and choose Api Keys from the sub-menu and to generate new key press Generate Api Key and enter the key name and then submit then you will see your new key is added to the list or simply open this url [https:\/\/yourdomain\/owner\/api_keys\/](\/owner\/api_keys\/), then add your key in the header
eg: `--header 'APIKEY: {YOUR_APIKEY}'`", "type": "apiKey", "in": "header", "name": "APIKEY" }, "OAuth2": { "description": "A Bearer Token is one of the forms of credential that can be used to access the Izam Application API, and is one of the core features of OAuth 2.0. Since it is generated using just an App's API Token, it makes a request on behalf of that App, You must pass this token with any endpoint request that can accepts OAuth 2.0 Bearer Token. To do so, include the following header in your request and making sure to replace ``` BEARER_TOKEN ``` with your generated Bearer Token:. ``` Authorization: Bearer BEARER_TOKEN ```", "type": "apiKey", "in": "header", "name": "Authorization" } }, "parameters": { "id": { "in": "path", "name": "id", "required": true, "schema": { "type": "integer" }, "description": "Item ID" }, "format": { "in": "path", "name": "format", "required": false, "schema": { "type": "string", "enum": [ ".json" ], "default": ".json" }, "description": "format of the output" }, "type": { "in": "path", "name": "type", "required": true, "schema": { "type": "string", "enum": [ "client", "invoice", "estimate", "purchase_order", "staff", "supplier", "product", "work_order" ] }, "description": "format of the output" }, "model": { "in": "path", "name": "model", "required": true, "schema": { "type": "string", "enum": [ "InvoiceLayout => Invoice Layouts", "GroupPrice => Price Groups", "Timezone => Time Zones", "dateFormats => Date Formats", "Language => Language Codes", "Role => Staff Roles", "Project => Projects", "TimeActivity => Activities" ] }, "description": "model you want to list its data" }, "collectionLimit": { "name": "limit", "in": "query", "description": "The collection items limit", "schema": { "type": "integer", "minimum": 1, "maximum": 1000, "default": 20 } }, "collectionPage": { "name": "page", "in": "query", "description": "The collection items page", "schema": { "type": "integer", "minimum": 1, "default": 1 } } } }, "security": [ { "OAuth2": [], "APIKEY": [] } ] }