{
  "swagger": "2.0",
  "info": {
    "description": "Public AutoCount connector API routed through AcctBridge.",
    "title": "AcctBridge AutoCount API",
    "contact": {},
    "version": "1.0"
  },
  "host": "api.acctbridge.com",
  "basePath": "/",
  "paths": {
    "/v1/autocount/advanced-quotations": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "advanced-quotations"
        ],
        "summary": "List advanced quotations or get one by doc_no",
        "parameters": [
          {
            "type": "string",
            "description": "Fetch single advanced quotation with details",
            "name": "doc_no",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Filter by debtor code",
            "name": "debtor_code",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Start date (YYYY-MM-DD)",
            "name": "date_from",
            "in": "query"
          },
          {
            "type": "string",
            "description": "End date (YYYY-MM-DD)",
            "name": "date_to",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "Page number (default 1)",
            "name": "page",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "Items per page (default 20, max 200)",
            "name": "per_page",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/ginex.Response"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/controllers.AdvancedQuotationListResp"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          }
        }
      },
      "put": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "advanced-quotations"
        ],
        "summary": "Update an advanced quotation",
        "parameters": [
          {
            "description": "Advanced quotation update payload",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/controllers.UpdateADVQTReq"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/ginex.Response"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/models.ADVQT"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "advanced-quotations"
        ],
        "summary": "Create advanced quotation",
        "parameters": [
          {
            "description": "Advanced quotation payload",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/controllers.CreateADVQTReq"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/ginex.Response"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/models.ADVQT"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "advanced-quotations"
        ],
        "summary": "Delete an advanced quotation",
        "parameters": [
          {
            "type": "string",
            "description": "DocNo to delete",
            "name": "doc_no",
            "in": "query",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          }
        }
      }
    },
    "/v1/autocount/ap/credit-notes": {
      "put": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "ap-credit-notes"
        ],
        "summary": "Update an AP credit note",
        "parameters": [
          {
            "description": "AP credit note update payload",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/controllers.UpdateAPCNReq"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/ginex.Response"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/models.APCN"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          }
        }
      }
    },
    "/v1/autocount/ap/debit-notes": {
      "put": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "ap-debit-notes"
        ],
        "summary": "Update an AP debit note",
        "parameters": [
          {
            "description": "AP debit note update payload",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/controllers.UpdateAPDNReq"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/ginex.Response"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/models.APDN"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          }
        }
      }
    },
    "/v1/autocount/ap/payments": {
      "put": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "ap-payments"
        ],
        "summary": "Update an AP payment",
        "parameters": [
          {
            "description": "AP payment update payload",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/controllers.UpdateAPPaymentReq"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/ginex.Response"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/models.APPayment"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          }
        }
      }
    },
    "/v1/autocount/cash-book": {
      "put": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "cash-book"
        ],
        "summary": "Update a cash book entry",
        "parameters": [
          {
            "description": "Cash book update payload",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/controllers.UpdateCBReq"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/ginex.Response"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/models.CB"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          }
        }
      }
    },
    "/v1/autocount/cash-purchase": {
      "put": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "cash-purchases"
        ],
        "summary": "Update a cash purchase",
        "parameters": [
          {
            "description": "Cash purchase update payload",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/controllers.UpdateCPReq"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/ginex.Response"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/models.CP"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          }
        }
      }
    },
    "/v1/autocount/cash-sales": {
      "put": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "cash-sales"
        ],
        "summary": "Update a cash sale",
        "parameters": [
          {
            "description": "Cash sale update payload",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/controllers.UpdateCSReq"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/ginex.Response"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/models.CS"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          }
        }
      }
    },
    "/v1/autocount/credit-notes": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "credit-notes"
        ],
        "summary": "List AR credit notes or get one by doc_no",
        "parameters": [
          {
            "type": "string",
            "description": "Fetch single credit note with details (overrides other filters)",
            "name": "doc_no",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Filter by debtor code",
            "name": "debtor_code",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Start date (YYYY-MM-DD)",
            "name": "date_from",
            "in": "query"
          },
          {
            "type": "string",
            "description": "End date (YYYY-MM-DD)",
            "name": "date_to",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "Page number (default 1)",
            "name": "page",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "Items per page (default 20, max 200)",
            "name": "per_page",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/ginex.Response"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/controllers.CreditNoteListResp"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          }
        }
      },
      "put": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "credit-notes"
        ],
        "summary": "Update an AR credit note",
        "parameters": [
          {
            "description": "Credit note update payload",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/controllers.UpdateCNReq"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/ginex.Response"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/models.ARCN"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "credit-notes"
        ],
        "summary": "Create an AR credit note",
        "parameters": [
          {
            "description": "CN create payload — items are qty-based (ItemCode+Qty+UnitPrice)",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/controllers.CreateCNReq"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/ginex.Response"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/models.ARCN"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "credit-notes"
        ],
        "summary": "Delete an AR credit note and reverse knock-offs",
        "parameters": [
          {
            "type": "string",
            "description": "DocNo to delete",
            "name": "doc_no",
            "in": "query",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          }
        }
      }
    },
    "/v1/autocount/credit-notes/cancel": {
      "patch": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "credit-notes"
        ],
        "summary": "Cancel an AR credit note",
        "parameters": [
          {
            "description": "DocNo to cancel",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/controllers.CancelDocReq"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          }
        }
      }
    },
    "/v1/autocount/credit-notes/knockoff": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "credit-notes"
        ],
        "summary": "Apply a credit note against one or more AR invoices",
        "parameters": [
          {
            "description": "CN knock-off payload — reduces CN KnockOffAmt and invoice Outstanding",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/controllers.KnockOffCNReq"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/ginex.Response"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/models.ARCN"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          }
        }
      }
    },
    "/v1/autocount/debit-notes": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "debit-notes"
        ],
        "summary": "List AR debit notes or get one by doc_no",
        "parameters": [
          {
            "type": "string",
            "description": "Fetch single debit note with details (overrides other filters)",
            "name": "doc_no",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Filter by debtor code",
            "name": "debtor_code",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Start date (YYYY-MM-DD)",
            "name": "date_from",
            "in": "query"
          },
          {
            "type": "string",
            "description": "End date (YYYY-MM-DD)",
            "name": "date_to",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "Page number (default 1)",
            "name": "page",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "Items per page (default 20, max 200)",
            "name": "per_page",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/ginex.Response"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/controllers.DebitNoteListResp"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          }
        }
      },
      "put": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "debit-notes"
        ],
        "summary": "Update an AR debit note",
        "parameters": [
          {
            "description": "Debit note update payload",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/controllers.UpdateDNReq"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/ginex.Response"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/models.ARDN"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "debit-notes"
        ],
        "summary": "Create an AR debit note",
        "parameters": [
          {
            "description": "DN create payload — items are amount-based GL postings; qty/unit_price are only accepted as a compatibility fallback",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/controllers.CreateDNReq"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/ginex.Response"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/models.ARDN"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "debit-notes"
        ],
        "summary": "Delete a debit note",
        "parameters": [
          {
            "type": "string",
            "description": "DocNo to delete",
            "name": "doc_no",
            "in": "query",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          }
        }
      }
    },
    "/v1/autocount/debit-notes/cancel": {
      "patch": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "debit-notes"
        ],
        "summary": "Cancel a debit note",
        "parameters": [
          {
            "description": "DocNo to cancel",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/controllers.CancelDocReq"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          }
        }
      }
    },
    "/v1/autocount/debtors": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "debtors"
        ],
        "summary": "List debtors or get one by code",
        "parameters": [
          {
            "type": "string",
            "description": "Fetch single debtor by AccNo (overrides other filters)",
            "name": "code",
            "in": "query"
          },
          {
            "type": "boolean",
            "description": "Filter by active status",
            "name": "is_active",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Search by AccNo or CompanyName",
            "name": "search",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "Page number (default 1)",
            "name": "page",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "Items per page (default 20, max 200)",
            "name": "per_page",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/ginex.Response"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/controllers.DebtorListResp"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "debtors"
        ],
        "summary": "Create a new debtor",
        "parameters": [
          {
            "description": "Debtor payload",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/controllers.CreateDebtorReq"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/ginex.Response"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/models.Debtor"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          }
        }
      }
    },
    "/v1/autocount/debtors/{acc_no}": {
      "put": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "debtors"
        ],
        "summary": "Update an existing debtor",
        "parameters": [
          {
            "type": "string",
            "description": "Debtor AccNo",
            "name": "acc_no",
            "in": "path",
            "required": true
          },
          {
            "description": "Updated debtor fields (only non-empty fields are applied)",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/controllers.UpdateDebtorReq"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "debtors"
        ],
        "summary": "Delete a debtor",
        "parameters": [
          {
            "type": "string",
            "description": "Debtor AccNo to delete",
            "name": "acc_no",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          }
        }
      }
    },
    "/v1/autocount/delivery-orders": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "delivery-orders"
        ],
        "summary": "List delivery orders or get one by doc_no",
        "parameters": [
          {
            "type": "string",
            "description": "Fetch single delivery order with details",
            "name": "doc_no",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Filter by debtor code",
            "name": "debtor_code",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Start date (YYYY-MM-DD)",
            "name": "date_from",
            "in": "query"
          },
          {
            "type": "string",
            "description": "End date (YYYY-MM-DD)",
            "name": "date_to",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "Page number (default 1)",
            "name": "page",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "Items per page (default 20, max 200)",
            "name": "per_page",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/ginex.Response"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/controllers.DeliveryOrderListResp"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          }
        }
      },
      "put": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "delivery-orders"
        ],
        "summary": "Update a delivery order",
        "parameters": [
          {
            "description": "Delivery order update payload",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/controllers.UpdateDOReq"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/ginex.Response"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/models.DO"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "delivery-orders"
        ],
        "summary": "Create delivery order",
        "parameters": [
          {
            "description": "Delivery order payload",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/controllers.CreateDOReq"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/ginex.Response"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/models.DO"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "delivery-orders"
        ],
        "summary": "Delete a delivery order",
        "parameters": [
          {
            "type": "string",
            "description": "DocNo to delete",
            "name": "doc_no",
            "in": "query",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          }
        }
      }
    },
    "/v1/autocount/delivery-orders/cancel": {
      "patch": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "delivery-orders"
        ],
        "summary": "Cancel a delivery order",
        "parameters": [
          {
            "description": "DocNo to cancel",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/controllers.CancelDocReq"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          }
        }
      }
    },
    "/v1/autocount/invoices": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "invoices"
        ],
        "summary": "List AR invoices or get one by doc_no",
        "parameters": [
          {
            "type": "string",
            "description": "Fetch single invoice with details (overrides other filters)",
            "name": "doc_no",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Filter by debtor code",
            "name": "debtor_code",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Start date (YYYY-MM-DD)",
            "name": "date_from",
            "in": "query"
          },
          {
            "type": "string",
            "description": "End date (YYYY-MM-DD)",
            "name": "date_to",
            "in": "query"
          },
          {
            "type": "boolean",
            "description": "Filter by cancelled status",
            "name": "cancelled",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "Page number (default 1)",
            "name": "page",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "Items per page (default 20, max 200)",
            "name": "per_page",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/ginex.Response"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/controllers.InvoiceListResp"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          }
        }
      },
      "put": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "invoices"
        ],
        "summary": "Update an AR invoice",
        "parameters": [
          {
            "description": "Invoice update payload",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/controllers.UpdateInvoiceReq"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/ginex.Response"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/models.ARInvoice"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "invoices"
        ],
        "summary": "Create AR invoice",
        "parameters": [
          {
            "description": "Invoice payload (items are GL postings with Amount+Tax, not Qty+UnitPrice)",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/controllers.CreateInvoiceReq"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/ginex.Response"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/models.ARInvoice"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "invoices"
        ],
        "summary": "Delete AR invoice",
        "parameters": [
          {
            "type": "string",
            "description": "Invoice doc_no to delete",
            "name": "doc_no",
            "in": "query",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          }
        }
      }
    },
    "/v1/autocount/invoices/cancel": {
      "patch": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "invoices"
        ],
        "summary": "Cancel AR invoice",
        "parameters": [
          {
            "description": "Invoice doc_no to cancel",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/controllers.CancelDocReq"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          }
        }
      }
    },
    "/v1/autocount/payments": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "payments"
        ],
        "summary": "List AR payments or get one by doc_no",
        "parameters": [
          {
            "type": "string",
            "description": "Fetch single payment with details (overrides other filters)",
            "name": "doc_no",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Filter by debtor code",
            "name": "debtor_code",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Start date (YYYY-MM-DD)",
            "name": "date_from",
            "in": "query"
          },
          {
            "type": "string",
            "description": "End date (YYYY-MM-DD)",
            "name": "date_to",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "Page number (default 1)",
            "name": "page",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "Items per page (default 20, max 200)",
            "name": "per_page",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/ginex.Response"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/controllers.PaymentListResp"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "payments"
        ],
        "summary": "Create AR payment with invoice knock-off",
        "parameters": [
          {
            "description": "Payment payload — knock_offs reduce invoice Outstanding",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/controllers.CreatePaymentReq"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/ginex.Response"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/models.ARPayment"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "payments"
        ],
        "summary": "Delete AR payment and reverse all invoice knock-offs",
        "parameters": [
          {
            "type": "string",
            "description": "Payment DocNo to delete",
            "name": "doc_no",
            "in": "query",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          }
        }
      }
    },
    "/v1/autocount/payments/cancel": {
      "patch": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "payments"
        ],
        "summary": "Cancel an AR payment (soft-delete — sets Cancelled='T')",
        "parameters": [
          {
            "description": "DocNo to cancel",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/controllers.CancelDocReq"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          }
        }
      }
    },
    "/v1/autocount/purchase/invoices": {
      "put": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "purchase-invoices"
        ],
        "summary": "Update a purchase invoice",
        "parameters": [
          {
            "description": "Purchase invoice update payload",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/controllers.UpdatePIReq"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/ginex.Response"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/models.PI"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          }
        }
      }
    },
    "/v1/autocount/purchase/orders": {
      "put": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "purchase-orders"
        ],
        "summary": "Update a purchase order",
        "parameters": [
          {
            "description": "Purchase order update payload",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/controllers.UpdatePOReq"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/ginex.Response"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/models.PO"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          }
        }
      }
    },
    "/v1/autocount/purchase/request-quotations": {
      "put": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "request-quotations"
        ],
        "summary": "Update a request quotation",
        "parameters": [
          {
            "description": "Request quotation update payload",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/controllers.UpdateRQReq"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/ginex.Response"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/models.RQ"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          }
        }
      }
    },
    "/v1/autocount/purchase/returns": {
      "put": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "purchase-returns"
        ],
        "summary": "Update a purchase return",
        "parameters": [
          {
            "description": "Purchase return update payload",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/controllers.UpdatePRReq"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/ginex.Response"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/models.PR"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          }
        }
      }
    },
    "/v1/autocount/refunds": {
      "put": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "refunds"
        ],
        "summary": "Update an AR refund",
        "parameters": [
          {
            "description": "Refund update payload",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/controllers.UpdateRefundReq"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/ginex.Response"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/models.ARRefund"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          }
        }
      }
    },
    "/v1/autocount/stock/issues": {
      "put": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "stock-issues"
        ],
        "summary": "Update a stock issue",
        "parameters": [
          {
            "description": "Stock issue update payload",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/controllers.UpdateISSReq"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/ginex.Response"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/models.ISS"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          }
        }
      }
    },
    "/v1/autocount/stock/receives": {
      "put": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "stock-receives"
        ],
        "summary": "Update a stock receive",
        "parameters": [
          {
            "description": "Stock receive update payload",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/controllers.UpdateRCVReq"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/ginex.Response"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/models.RCV"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          }
        }
      }
    },
    "/v1/autocount/stock/transfers": {
      "put": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "stock-transfers"
        ],
        "summary": "Update a stock transfer",
        "parameters": [
          {
            "description": "Stock transfer update payload",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/controllers.UpdateXFERReq"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/ginex.Response"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/models.XFER"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          }
        }
      }
    },
    "/v1/autocount/tax-entities": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "tax-entities"
        ],
        "summary": "List tax entities or get one by TIN",
        "parameters": [
          {
            "type": "string",
            "description": "Fetch single tax entity by TIN",
            "name": "tin",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "Page number (default 1)",
            "name": "page",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "Items per page (default 20, max 200)",
            "name": "per_page",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/ginex.Response"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/controllers.TaxEntityListResp"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          }
        }
      },
      "put": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "tax-entities"
        ],
        "summary": "Update a tax entity",
        "parameters": [
          {
            "description": "Tax entity update payload",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/controllers.UpdateTaxEntityReq"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/ginex.Response"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/models.TaxEntity"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "tax-entities"
        ],
        "summary": "Create tax entity",
        "parameters": [
          {
            "description": "Tax entity payload",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/controllers.CreateTaxEntityReq"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/ginex.Response"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/models.TaxEntity"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "tax-entities"
        ],
        "summary": "Delete a tax entity",
        "parameters": [
          {
            "type": "string",
            "description": "TIN to delete",
            "name": "tin",
            "in": "query",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ginex.Response"
            }
          }
        }
      }
    }
  },
  "definitions": {
    "controllers.AdvancedQuotationListResp": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/models.ADVQT"
          }
        },
        "page": {
          "type": "integer"
        },
        "per_page": {
          "type": "integer"
        },
        "total": {
          "type": "integer"
        }
      }
    },
    "controllers.CancelDocReq": {
      "type": "object",
      "required": [
        "doc_no"
      ],
      "properties": {
        "doc_no": {
          "type": "string"
        }
      }
    },
    "controllers.CreateADVQTItemReq": {
      "type": "object",
      "required": [
        "item_code",
        "qty"
      ],
      "properties": {
        "description": {
          "type": "string"
        },
        "discount": {
          "type": "string"
        },
        "item_code": {
          "type": "string"
        },
        "qty": {
          "type": "number"
        },
        "tax_rate": {
          "type": "number"
        },
        "tax_type": {
          "type": "string"
        },
        "unit_price": {
          "type": "number"
        },
        "uom": {
          "type": "string"
        }
      }
    },
    "controllers.CreateADVQTReq": {
      "type": "object",
      "required": [
        "debtor_code",
        "doc_date",
        "items"
      ],
      "properties": {
        "currency_code": {
          "type": "string"
        },
        "debtor_code": {
          "type": "string"
        },
        "debtor_name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "disable_credit_control": {
          "type": "string"
        },
        "display_term": {
          "type": "string"
        },
        "doc_date": {
          "type": "string"
        },
        "doc_no": {
          "type": "string"
        },
        "external_link": {
          "type": "string"
        },
        "inclusive_tax": {
          "type": "string"
        },
        "items": {
          "type": "array",
          "minItems": 1,
          "items": {
            "$ref": "#/definitions/controllers.CreateADVQTItemReq"
          }
        },
        "ref": {
          "type": "string"
        },
        "rev": {
          "type": "integer"
        },
        "sales_agent": {
          "type": "string"
        }
      }
    },
    "controllers.CreateCNItemReq": {
      "type": "object",
      "required": [
        "description",
        "item_code",
        "qty",
        "tax_rate",
        "tax_type",
        "unit_price"
      ],
      "properties": {
        "acc_no": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "item_code": {
          "type": "string"
        },
        "qty": {
          "type": "number"
        },
        "tax_rate": {
          "type": "number"
        },
        "tax_type": {
          "type": "string"
        },
        "unit_price": {
          "type": "number"
        }
      }
    },
    "controllers.CreateCNReq": {
      "type": "object",
      "required": [
        "debtor_code",
        "description",
        "doc_date",
        "items"
      ],
      "properties": {
        "cn_type": {
          "type": "string"
        },
        "currency_code": {
          "type": "string"
        },
        "debtor_code": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "doc_date": {
          "type": "string"
        },
        "doc_no": {
          "type": "string"
        },
        "items": {
          "type": "array",
          "minItems": 1,
          "items": {
            "$ref": "#/definitions/controllers.CreateCNItemReq"
          }
        },
        "ref": {
          "type": "string"
        }
      }
    },
    "controllers.CreateCashPurchaseItemReq": {
      "type": "object",
      "properties": {
        "batch_no": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "discount": {
          "type": "string"
        },
        "item_code": {
          "type": "string"
        },
        "location": {
          "type": "string"
        },
        "qty": {
          "type": "number"
        },
        "tax_code": {
          "type": "string"
        },
        "tax_rate": {
          "type": "number"
        },
        "unit_price": {
          "type": "number"
        },
        "uom": {
          "type": "string"
        }
      }
    },
    "controllers.CreateCashSalesItemReq": {
      "type": "object",
      "properties": {
        "description": {
          "type": "string"
        },
        "discount": {
          "type": "string"
        },
        "item_code": {
          "type": "string"
        },
        "qty": {
          "type": "number"
        },
        "tax_code": {
          "type": "string"
        },
        "tax_rate": {
          "type": "number"
        },
        "unit_price": {
          "type": "number"
        },
        "uom": {
          "type": "string"
        }
      }
    },
    "controllers.CreateDNItemReq": {
      "type": "object",
      "required": [
        "description"
      ],
      "properties": {
        "acc_no": {
          "type": "string"
        },
        "amount": {
          "type": "number"
        },
        "description": {
          "type": "string"
        },
        "qty": {
          "type": "number"
        },
        "tax_rate": {
          "type": "number"
        },
        "tax_type": {
          "type": "string"
        },
        "unit_price": {
          "type": "number"
        }
      }
    },
    "controllers.CreateDNReq": {
      "type": "object",
      "required": [
        "debtor_code",
        "description",
        "doc_date",
        "items"
      ],
      "properties": {
        "currency_code": {
          "type": "string"
        },
        "debtor_code": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "display_term": {
          "type": "string"
        },
        "dn_type": {
          "type": "string"
        },
        "doc_date": {
          "type": "string"
        },
        "doc_no": {
          "type": "string"
        },
        "due_date": {
          "type": "string"
        },
        "items": {
          "type": "array",
          "minItems": 1,
          "items": {
            "$ref": "#/definitions/controllers.CreateDNItemReq"
          }
        },
        "ref": {
          "type": "string"
        },
        "ref_no2": {
          "type": "string"
        },
        "sales_agent": {
          "type": "string"
        }
      }
    },
    "controllers.CreateDOItemReq": {
      "type": "object",
      "required": [
        "item_code",
        "qty"
      ],
      "properties": {
        "delivery_date": {
          "type": "string"
        },
        "desc2": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "discount": {
          "type": "string"
        },
        "further_description": {
          "type": "string"
        },
        "item_code": {
          "type": "string"
        },
        "qty": {
          "type": "number"
        },
        "sales_exemption_no": {
          "type": "string"
        },
        "tax_rate": {
          "type": "number"
        },
        "tax_type": {
          "type": "string"
        },
        "unit_price": {
          "type": "number"
        },
        "uom": {
          "type": "string"
        }
      }
    },
    "controllers.CreateDOReq": {
      "type": "object",
      "required": [
        "debtor_code",
        "doc_date",
        "items"
      ],
      "properties": {
        "cc": {
          "type": "string"
        },
        "debtor_code": {
          "type": "string"
        },
        "debtor_name": {
          "type": "string"
        },
        "delivery_term": {
          "type": "string"
        },
        "doc_date": {
          "type": "string"
        },
        "doc_no": {
          "type": "string"
        },
        "inclusive_tax": {
          "type": "string"
        },
        "inv_addr1": {
          "type": "string"
        },
        "inv_addr2": {
          "type": "string"
        },
        "inv_addr3": {
          "type": "string"
        },
        "inv_addr4": {
          "type": "string"
        },
        "items": {
          "type": "array",
          "minItems": 1,
          "items": {
            "$ref": "#/definitions/controllers.CreateDOItemReq"
          }
        },
        "multi_price": {
          "type": "string"
        },
        "payment_term": {
          "type": "string"
        },
        "sales_agent": {
          "type": "string"
        },
        "ship_info": {
          "type": "string"
        },
        "validity": {
          "type": "string"
        }
      }
    },
    "controllers.CreateDebtorReq": {
      "type": "object",
      "required": [
        "company_name"
      ],
      "properties": {
        "acc_no": {
          "type": "string"
        },
        "address_1": {
          "type": "string"
        },
        "address_2": {
          "type": "string"
        },
        "address_3": {
          "type": "string"
        },
        "address_4": {
          "type": "string"
        },
        "aging_on": {
          "type": "string"
        },
        "allow_exceed_credit_limit": {
          "type": "string"
        },
        "attention": {
          "type": "string"
        },
        "company_name": {
          "type": "string"
        },
        "currency_code": {
          "type": "string"
        },
        "debtor_type": {
          "type": "string"
        },
        "desc_2": {
          "type": "string"
        },
        "display_term": {
          "type": "string"
        },
        "email_address": {
          "type": "string"
        },
        "fax_1": {
          "type": "string"
        },
        "fax_2": {
          "type": "string"
        },
        "inclusive_tax": {
          "type": "string"
        },
        "is_active": {
          "type": "string"
        },
        "is_cash_sale_debtor": {
          "type": "string"
        },
        "is_group_company": {
          "type": "string"
        },
        "mobile": {
          "type": "string"
        },
        "nature_of_business": {
          "type": "string"
        },
        "note": {
          "type": "string"
        },
        "phone_1": {
          "type": "string"
        },
        "phone_2": {
          "type": "string"
        },
        "post_code": {
          "type": "string"
        },
        "register_no": {
          "type": "string"
        },
        "sales_agent": {
          "type": "string"
        },
        "statement_type": {
          "type": "string"
        },
        "tax_code": {
          "type": "string"
        }
      }
    },
    "controllers.CreateInvoiceItemReq": {
      "type": "object",
      "required": [
        "amount",
        "description"
      ],
      "properties": {
        "acc_no": {
          "type": "string"
        },
        "amount": {
          "type": "number"
        },
        "description": {
          "type": "string"
        },
        "tax_rate": {
          "type": "number"
        },
        "tax_type": {
          "type": "string"
        }
      }
    },
    "controllers.CreateInvoiceReq": {
      "type": "object",
      "required": [
        "debtor_code",
        "doc_date",
        "items"
      ],
      "properties": {
        "currency_code": {
          "type": "string"
        },
        "debtor_code": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "display_term": {
          "type": "string"
        },
        "doc_date": {
          "type": "string"
        },
        "doc_no": {
          "type": "string"
        },
        "due_date": {
          "type": "string"
        },
        "items": {
          "type": "array",
          "minItems": 1,
          "items": {
            "$ref": "#/definitions/controllers.CreateInvoiceItemReq"
          }
        },
        "ref_no2": {
          "type": "string"
        },
        "sales_agent": {
          "type": "string"
        }
      }
    },
    "controllers.CreatePIItemReq": {
      "type": "object",
      "properties": {
        "batch_no": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "discount": {
          "type": "string"
        },
        "item_code": {
          "type": "string"
        },
        "location": {
          "type": "string"
        },
        "qty": {
          "type": "number"
        },
        "tax_code": {
          "type": "string"
        },
        "tax_rate": {
          "type": "number"
        },
        "unit_price": {
          "type": "number"
        },
        "uom": {
          "type": "string"
        }
      }
    },
    "controllers.CreatePOItemReq": {
      "type": "object",
      "properties": {
        "batch_no": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "discount": {
          "type": "string"
        },
        "item_code": {
          "type": "string"
        },
        "location": {
          "type": "string"
        },
        "qty": {
          "type": "number"
        },
        "tax_code": {
          "type": "string"
        },
        "tax_rate": {
          "type": "number"
        },
        "unit_price": {
          "type": "number"
        },
        "uom": {
          "type": "string"
        }
      }
    },
    "controllers.CreatePaymentKnockOffReq": {
      "type": "object",
      "required": [
        "amount",
        "invoice_doc_no"
      ],
      "properties": {
        "amount": {
          "type": "number"
        },
        "invoice_doc_no": {
          "type": "string"
        }
      }
    },
    "controllers.CreatePaymentMethodReq": {
      "type": "object",
      "required": [
        "payment_amt",
        "payment_method"
      ],
      "properties": {
        "cheque_no": {
          "type": "string"
        },
        "payment_amt": {
          "type": "number"
        },
        "payment_method": {
          "type": "string"
        }
      }
    },
    "controllers.CreatePaymentReq": {
      "type": "object",
      "required": [
        "debtor_code",
        "doc_date",
        "knock_offs",
        "payment_methods"
      ],
      "properties": {
        "currency_code": {
          "type": "string"
        },
        "debtor_code": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "doc_date": {
          "type": "string"
        },
        "doc_no": {
          "type": "string"
        },
        "knock_offs": {
          "type": "array",
          "minItems": 1,
          "items": {
            "$ref": "#/definitions/controllers.CreatePaymentKnockOffReq"
          }
        },
        "payment_methods": {
          "type": "array",
          "minItems": 1,
          "items": {
            "$ref": "#/definitions/controllers.CreatePaymentMethodReq"
          }
        }
      }
    },
    "controllers.CreatePurchaseReturnItemReq": {
      "type": "object",
      "properties": {
        "batch_no": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "discount": {
          "type": "string"
        },
        "item_code": {
          "type": "string"
        },
        "location": {
          "type": "string"
        },
        "qty": {
          "type": "number"
        },
        "tax_code": {
          "type": "string"
        },
        "tax_rate": {
          "type": "number"
        },
        "unit_price": {
          "type": "number"
        },
        "uom": {
          "type": "string"
        }
      }
    },
    "controllers.CreateRequestQuotationItemReq": {
      "type": "object",
      "properties": {
        "batch_no": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "discount": {
          "type": "string"
        },
        "item_code": {
          "type": "string"
        },
        "location": {
          "type": "string"
        },
        "qty": {
          "type": "number"
        },
        "tax_code": {
          "type": "string"
        },
        "tax_rate": {
          "type": "number"
        },
        "unit_price": {
          "type": "number"
        },
        "uom": {
          "type": "string"
        }
      }
    },
    "controllers.CreateStockIssueItemReq": {
      "type": "object",
      "required": [
        "item_code",
        "qty"
      ],
      "properties": {
        "batch_no": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "item_code": {
          "type": "string"
        },
        "location": {
          "type": "string"
        },
        "qty": {
          "type": "number"
        },
        "unit_cost": {
          "type": "number"
        },
        "uom": {
          "type": "string"
        }
      }
    },
    "controllers.CreateStockReceiveItemReq": {
      "type": "object",
      "required": [
        "item_code",
        "qty"
      ],
      "properties": {
        "batch_no": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "item_code": {
          "type": "string"
        },
        "location": {
          "type": "string"
        },
        "qty": {
          "type": "number"
        },
        "unit_cost": {
          "type": "number"
        },
        "uom": {
          "type": "string"
        }
      }
    },
    "controllers.CreateStockTransferItemReq": {
      "type": "object",
      "required": [
        "item_code",
        "qty"
      ],
      "properties": {
        "batch_no": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "item_code": {
          "type": "string"
        },
        "qty": {
          "type": "number"
        },
        "unit_cost": {
          "type": "number"
        },
        "uom": {
          "type": "string"
        }
      }
    },
    "controllers.CreateTaxEntityReq": {
      "type": "object",
      "required": [
        "address",
        "business_activity_desc",
        "city",
        "country_code",
        "email_address",
        "msic_code",
        "name",
        "phone",
        "post_code",
        "state_code",
        "tax_classification",
        "tin",
        "trade_name"
      ],
      "properties": {
        "address": {
          "type": "string"
        },
        "business_activity_desc": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "country_code": {
          "type": "string"
        },
        "email_address": {
          "type": "string"
        },
        "full_tin": {
          "type": "string"
        },
        "gst_register_no": {
          "type": "string"
        },
        "identity_no": {
          "type": "string"
        },
        "msic_code": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "phone": {
          "type": "string"
        },
        "post_code": {
          "type": "string"
        },
        "sst_register_no": {
          "type": "string"
        },
        "state_code": {
          "type": "string"
        },
        "tax_branch_id": {
          "type": "string"
        },
        "tax_category": {
          "type": "integer"
        },
        "tax_classification": {
          "type": "integer"
        },
        "tin": {
          "type": "string"
        },
        "tourism_tax_register_no": {
          "type": "string"
        },
        "trade_name": {
          "type": "string"
        }
      }
    },
    "controllers.CreditNoteListResp": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/models.ARCN"
          }
        },
        "page": {
          "type": "integer"
        },
        "per_page": {
          "type": "integer"
        },
        "total": {
          "type": "integer"
        }
      }
    },
    "controllers.DebitNoteListResp": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/models.ARDN"
          }
        },
        "page": {
          "type": "integer"
        },
        "per_page": {
          "type": "integer"
        },
        "total": {
          "type": "integer"
        }
      }
    },
    "controllers.DebtorListResp": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/models.Debtor"
          }
        },
        "page": {
          "type": "integer"
        },
        "per_page": {
          "type": "integer"
        },
        "total": {
          "type": "integer"
        }
      }
    },
    "controllers.DebugColumnInfo": {
      "type": "object",
      "properties": {
        "column_default": {
          "type": "string"
        },
        "column_name": {
          "type": "string"
        },
        "data_type": {
          "type": "string"
        },
        "is_nullable": {
          "type": "string"
        },
        "max_length": {
          "type": "string"
        }
      }
    },
    "controllers.DebugColumnsResp": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/controllers.DebugColumnInfo"
          }
        }
      }
    },
    "controllers.DebugTableInfo": {
      "type": "object",
      "properties": {
        "table_name": {
          "type": "string"
        },
        "table_type": {
          "type": "string"
        }
      }
    },
    "controllers.DebugTablesResp": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/controllers.DebugTableInfo"
          }
        }
      }
    },
    "controllers.DeliveryOrderListResp": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/models.DO"
          }
        },
        "page": {
          "type": "integer"
        },
        "per_page": {
          "type": "integer"
        },
        "total": {
          "type": "integer"
        }
      }
    },
    "controllers.InvoiceListResp": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/models.ARInvoice"
          }
        },
        "page": {
          "type": "integer"
        },
        "per_page": {
          "type": "integer"
        },
        "total": {
          "type": "integer"
        }
      }
    },
    "controllers.KnockOffCNInvReq": {
      "type": "object",
      "required": [
        "amount",
        "invoice_doc_no"
      ],
      "properties": {
        "amount": {
          "type": "number"
        },
        "invoice_doc_no": {
          "type": "string"
        }
      }
    },
    "controllers.KnockOffCNReq": {
      "type": "object",
      "required": [
        "credit_note_doc_no",
        "doc_date",
        "invoices"
      ],
      "properties": {
        "credit_note_doc_no": {
          "type": "string"
        },
        "doc_date": {
          "type": "string"
        },
        "invoices": {
          "type": "array",
          "minItems": 1,
          "items": {
            "$ref": "#/definitions/controllers.KnockOffCNInvReq"
          }
        }
      }
    },
    "controllers.PaymentListResp": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/models.ARPayment"
          }
        },
        "page": {
          "type": "integer"
        },
        "per_page": {
          "type": "integer"
        },
        "total": {
          "type": "integer"
        }
      }
    },
    "controllers.TaxEntityListResp": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/models.TaxEntity"
          }
        },
        "page": {
          "type": "integer"
        },
        "per_page": {
          "type": "integer"
        },
        "total": {
          "type": "integer"
        }
      }
    },
    "controllers.UpdateADVQTReq": {
      "type": "object",
      "required": [
        "doc_no",
        "items"
      ],
      "properties": {
        "currency_code": {
          "type": "string"
        },
        "debtor_code": {
          "type": "string"
        },
        "debtor_name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "disable_credit_control": {
          "type": "string"
        },
        "display_term": {
          "type": "string"
        },
        "doc_no": {
          "type": "string"
        },
        "external_link": {
          "type": "string"
        },
        "items": {
          "type": "array",
          "minItems": 1,
          "items": {
            "$ref": "#/definitions/controllers.CreateADVQTItemReq"
          }
        },
        "ref": {
          "type": "string"
        },
        "rev": {
          "type": "integer"
        },
        "sales_agent": {
          "type": "string"
        }
      }
    },
    "controllers.UpdateAPCNItemReq": {
      "type": "object",
      "properties": {
        "acc_no": {
          "type": "string"
        },
        "amount": {
          "type": "number"
        },
        "tax_code": {
          "type": "string"
        },
        "tax_rate": {
          "type": "number"
        }
      }
    },
    "controllers.UpdateAPCNReq": {
      "type": "object",
      "required": [
        "doc_no"
      ],
      "properties": {
        "creditor_code": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "doc_no": {
          "type": "string"
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/controllers.UpdateAPCNItemReq"
          }
        },
        "reason": {
          "type": "string"
        }
      }
    },
    "controllers.UpdateAPDNItemReq": {
      "type": "object",
      "properties": {
        "acc_no": {
          "type": "string"
        },
        "amount": {
          "type": "number"
        },
        "tax_code": {
          "type": "string"
        },
        "tax_rate": {
          "type": "number"
        }
      }
    },
    "controllers.UpdateAPDNReq": {
      "type": "object",
      "required": [
        "doc_no"
      ],
      "properties": {
        "creditor_code": {
          "type": "string"
        },
        "doc_no": {
          "type": "string"
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/controllers.UpdateAPDNItemReq"
          }
        },
        "reason": {
          "type": "string"
        }
      }
    },
    "controllers.UpdateAPPaymentMethodReq": {
      "type": "object",
      "properties": {
        "cheque_no": {
          "type": "string"
        },
        "payment_amt": {
          "type": "number"
        },
        "payment_method": {
          "type": "string"
        }
      }
    },
    "controllers.UpdateAPPaymentReq": {
      "type": "object",
      "required": [
        "doc_no"
      ],
      "properties": {
        "creditor_code": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "doc_no": {
          "type": "string"
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/controllers.UpdateAPPaymentMethodReq"
          }
        }
      }
    },
    "controllers.UpdateCBItemReq": {
      "type": "object",
      "properties": {
        "acc_no": {
          "type": "string"
        },
        "amount": {
          "type": "number"
        },
        "tax_code": {
          "type": "string"
        },
        "tax_rate": {
          "type": "number"
        }
      }
    },
    "controllers.UpdateCBPaymentMethodReq": {
      "type": "object",
      "properties": {
        "cheque_no": {
          "type": "string"
        },
        "payment_amt": {
          "type": "number"
        },
        "payment_method": {
          "type": "string"
        }
      }
    },
    "controllers.UpdateCBReq": {
      "type": "object",
      "required": [
        "doc_no"
      ],
      "properties": {
        "deal_with": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "doc_no": {
          "type": "string"
        },
        "doc_type": {
          "type": "string"
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/controllers.UpdateCBItemReq"
          }
        },
        "payment_methods": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/controllers.UpdateCBPaymentMethodReq"
          }
        }
      }
    },
    "controllers.UpdateCNItemReq": {
      "type": "object",
      "properties": {
        "acc_no": {
          "type": "string"
        },
        "amount": {
          "type": "number"
        },
        "description": {
          "type": "string"
        },
        "tax_rate": {
          "type": "number"
        },
        "tax_type": {
          "type": "string"
        }
      }
    },
    "controllers.UpdateCNReq": {
      "type": "object",
      "required": [
        "doc_no"
      ],
      "properties": {
        "debtor_code": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "doc_no": {
          "type": "string"
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/controllers.UpdateCNItemReq"
          }
        }
      }
    },
    "controllers.UpdateCPReq": {
      "type": "object",
      "required": [
        "doc_no"
      ],
      "properties": {
        "creditor_code": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "display_term": {
          "type": "string"
        },
        "doc_no": {
          "type": "string"
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/controllers.CreateCashPurchaseItemReq"
          }
        },
        "payment_amt": {
          "type": "number"
        },
        "payment_method": {
          "type": "string"
        }
      }
    },
    "controllers.UpdateCSReq": {
      "type": "object",
      "required": [
        "doc_no"
      ],
      "properties": {
        "debtor_code": {
          "type": "string"
        },
        "debtor_name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "doc_no": {
          "type": "string"
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/controllers.CreateCashSalesItemReq"
          }
        }
      }
    },
    "controllers.UpdateDNItemReq": {
      "type": "object",
      "properties": {
        "acc_no": {
          "type": "string"
        },
        "amount": {
          "type": "number"
        },
        "description": {
          "type": "string"
        },
        "tax_rate": {
          "type": "number"
        },
        "tax_type": {
          "type": "string"
        }
      }
    },
    "controllers.UpdateDNReq": {
      "type": "object",
      "required": [
        "doc_no"
      ],
      "properties": {
        "debtor_code": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "doc_no": {
          "type": "string"
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/controllers.UpdateDNItemReq"
          }
        }
      }
    },
    "controllers.UpdateDOReq": {
      "type": "object",
      "required": [
        "doc_no",
        "items"
      ],
      "properties": {
        "cc": {
          "type": "string"
        },
        "debtor_code": {
          "type": "string"
        },
        "debtor_name": {
          "type": "string"
        },
        "delivery_term": {
          "type": "string"
        },
        "doc_no": {
          "type": "string"
        },
        "inv_addr1": {
          "type": "string"
        },
        "inv_addr2": {
          "type": "string"
        },
        "inv_addr3": {
          "type": "string"
        },
        "inv_addr4": {
          "type": "string"
        },
        "items": {
          "type": "array",
          "minItems": 1,
          "items": {
            "$ref": "#/definitions/controllers.CreateDOItemReq"
          }
        },
        "multi_price": {
          "type": "string"
        },
        "payment_term": {
          "type": "string"
        },
        "sales_agent": {
          "type": "string"
        },
        "ship_info": {
          "type": "string"
        },
        "validity": {
          "type": "string"
        }
      }
    },
    "controllers.UpdateDebtorReq": {
      "type": "object",
      "properties": {
        "address_1": {
          "type": "string"
        },
        "address_2": {
          "type": "string"
        },
        "address_3": {
          "type": "string"
        },
        "address_4": {
          "type": "string"
        },
        "aging_on": {
          "type": "string"
        },
        "allow_exceed_credit_limit": {
          "type": "string"
        },
        "attention": {
          "type": "string"
        },
        "company_name": {
          "type": "string"
        },
        "currency_code": {
          "type": "string"
        },
        "debtor_type": {
          "type": "string"
        },
        "desc_2": {
          "type": "string"
        },
        "display_term": {
          "type": "string"
        },
        "email_address": {
          "type": "string"
        },
        "fax_1": {
          "type": "string"
        },
        "fax_2": {
          "type": "string"
        },
        "inclusive_tax": {
          "type": "string"
        },
        "is_active": {
          "type": "string"
        },
        "is_cash_sale_debtor": {
          "type": "string"
        },
        "is_group_company": {
          "type": "string"
        },
        "mobile": {
          "type": "string"
        },
        "nature_of_business": {
          "type": "string"
        },
        "note": {
          "type": "string"
        },
        "phone_1": {
          "type": "string"
        },
        "phone_2": {
          "type": "string"
        },
        "post_code": {
          "type": "string"
        },
        "sales_agent": {
          "type": "string"
        },
        "statement_type": {
          "type": "string"
        },
        "tax_code": {
          "type": "string"
        }
      }
    },
    "controllers.UpdateISSReq": {
      "type": "object",
      "required": [
        "doc_no"
      ],
      "properties": {
        "description": {
          "type": "string"
        },
        "doc_no": {
          "type": "string"
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/controllers.CreateStockIssueItemReq"
          }
        },
        "ref_doc_no": {
          "type": "string"
        }
      }
    },
    "controllers.UpdateInvoiceItemReq": {
      "type": "object",
      "properties": {
        "acc_no": {
          "type": "string"
        },
        "amount": {
          "type": "number"
        },
        "description": {
          "type": "string"
        },
        "sub_total": {
          "type": "number"
        },
        "tax_rate": {
          "type": "number"
        },
        "tax_type": {
          "type": "string"
        }
      }
    },
    "controllers.UpdateInvoiceReq": {
      "type": "object",
      "required": [
        "doc_no"
      ],
      "properties": {
        "currency_code": {
          "type": "string"
        },
        "debtor_code": {
          "type": "string"
        },
        "debtor_name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "display_term": {
          "type": "string"
        },
        "doc_no": {
          "type": "string"
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/controllers.UpdateInvoiceItemReq"
          }
        },
        "sales_agent": {
          "type": "string"
        }
      }
    },
    "controllers.UpdatePIReq": {
      "type": "object",
      "required": [
        "doc_no"
      ],
      "properties": {
        "creditor_code": {
          "type": "string"
        },
        "currency_code": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "display_term": {
          "type": "string"
        },
        "doc_no": {
          "type": "string"
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/controllers.CreatePIItemReq"
          }
        },
        "note": {
          "type": "string"
        },
        "purchase_agent": {
          "type": "string"
        },
        "ref": {
          "type": "string"
        },
        "ref_doc_no": {
          "type": "string"
        },
        "ref_no2": {
          "type": "string"
        },
        "supplier_do_no": {
          "type": "string"
        },
        "supplier_invoice_no": {
          "type": "string"
        }
      }
    },
    "controllers.UpdatePOReq": {
      "type": "object",
      "required": [
        "doc_no"
      ],
      "properties": {
        "creditor_code": {
          "type": "string"
        },
        "creditor_name": {
          "type": "string"
        },
        "currency_code": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "display_term": {
          "type": "string"
        },
        "doc_no": {
          "type": "string"
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/controllers.CreatePOItemReq"
          }
        },
        "purchase_agent": {
          "type": "string"
        },
        "ref": {
          "type": "string"
        }
      }
    },
    "controllers.UpdatePRReq": {
      "type": "object",
      "required": [
        "doc_no"
      ],
      "properties": {
        "creditor_code": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "display_term": {
          "type": "string"
        },
        "doc_no": {
          "type": "string"
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/controllers.CreatePurchaseReturnItemReq"
          }
        }
      }
    },
    "controllers.UpdateRCVReq": {
      "type": "object",
      "required": [
        "doc_no"
      ],
      "properties": {
        "description": {
          "type": "string"
        },
        "doc_no": {
          "type": "string"
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/controllers.CreateStockReceiveItemReq"
          }
        },
        "ref_doc_no": {
          "type": "string"
        }
      }
    },
    "controllers.UpdateRQReq": {
      "type": "object",
      "required": [
        "doc_no"
      ],
      "properties": {
        "creditor_code": {
          "type": "string"
        },
        "display_term": {
          "type": "string"
        },
        "doc_no": {
          "type": "string"
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/controllers.CreateRequestQuotationItemReq"
          }
        }
      }
    },
    "controllers.UpdateRefundItemReq": {
      "type": "object",
      "properties": {
        "cheque_no": {
          "type": "string"
        },
        "payment_amt": {
          "type": "number"
        },
        "payment_method": {
          "type": "string"
        }
      }
    },
    "controllers.UpdateRefundReq": {
      "type": "object",
      "required": [
        "doc_no"
      ],
      "properties": {
        "debtor_code": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "doc_no": {
          "type": "string"
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/controllers.UpdateRefundItemReq"
          }
        }
      }
    },
    "controllers.UpdateTaxEntityReq": {
      "type": "object",
      "required": [
        "tin"
      ],
      "properties": {
        "address": {
          "type": "string"
        },
        "business_activity_desc": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "country_code": {
          "type": "string"
        },
        "email_address": {
          "type": "string"
        },
        "full_tin": {
          "type": "string"
        },
        "gst_register_no": {
          "type": "string"
        },
        "identity_no": {
          "type": "string"
        },
        "msic_code": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "phone": {
          "type": "string"
        },
        "post_code": {
          "type": "string"
        },
        "sst_register_no": {
          "type": "string"
        },
        "state_code": {
          "type": "string"
        },
        "tax_branch_id": {
          "type": "string"
        },
        "tax_category": {
          "type": "integer"
        },
        "tax_classification": {
          "type": "integer"
        },
        "tin": {
          "type": "string"
        },
        "tourism_tax_register_no": {
          "type": "string"
        },
        "trade_name": {
          "type": "string"
        }
      }
    },
    "controllers.UpdateXFERReq": {
      "type": "object",
      "required": [
        "doc_no"
      ],
      "properties": {
        "description": {
          "type": "string"
        },
        "doc_no": {
          "type": "string"
        },
        "from_location": {
          "type": "string"
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/controllers.CreateStockTransferItemReq"
          }
        },
        "to_location": {
          "type": "string"
        }
      }
    },
    "ginex.Response": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer"
        },
        "data": {},
        "message": {
          "type": "string"
        }
      }
    },
    "models.ADVQT": {
      "type": "object",
      "properties": {
        "canSync": {
          "type": "string"
        },
        "cancelled": {
          "type": "string"
        },
        "createdTimeStamp": {
          "type": "string"
        },
        "createdUserID": {
          "type": "string"
        },
        "currencyCode": {
          "type": "string"
        },
        "currencyRate": {
          "type": "number"
        },
        "debtorCode": {
          "type": "string"
        },
        "debtorName": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "details": {
          "description": "loaded separately",
          "type": "array",
          "items": {
            "$ref": "#/definitions/models.ADVQTDTL"
          }
        },
        "disableCreditControl": {
          "type": "string"
        },
        "displayTerm": {
          "type": "string"
        },
        "docDate": {
          "type": "string"
        },
        "docKey": {
          "type": "integer"
        },
        "docNo": {
          "type": "string"
        },
        "docStatus": {
          "type": "string"
        },
        "exTax": {
          "type": "number"
        },
        "externalLink": {
          "type": "string"
        },
        "finalTotal": {
          "type": "number"
        },
        "inclusiveTax": {
          "type": "string"
        },
        "isRoundAdj": {
          "type": "string"
        },
        "lastModified": {
          "type": "string"
        },
        "lastModifiedUserID": {
          "type": "string"
        },
        "lastUpdate": {
          "type": "integer"
        },
        "localExTax": {
          "type": "number"
        },
        "localNetTotal": {
          "type": "number"
        },
        "localTax": {
          "type": "number"
        },
        "localTaxableAmt": {
          "type": "number"
        },
        "localTotal": {
          "type": "number"
        },
        "netTotal": {
          "type": "number"
        },
        "printCount": {
          "type": "integer"
        },
        "ref": {
          "type": "string"
        },
        "rev": {
          "type": "integer"
        },
        "roundingMethod": {
          "type": "integer"
        },
        "salesAgent": {
          "type": "string"
        },
        "tax": {
          "type": "number"
        },
        "taxableAmt": {
          "type": "number"
        },
        "toTaxCurrencyRate": {
          "type": "number"
        },
        "total": {
          "type": "number"
        },
        "transferable": {
          "type": "string"
        }
      }
    },
    "models.ADVQTDTL": {
      "type": "object",
      "properties": {
        "addToSubTotal": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "discount": {
          "type": "string"
        },
        "discountAmt": {
          "type": "number"
        },
        "docKey": {
          "type": "integer"
        },
        "dtlKey": {
          "type": "integer"
        },
        "itemCode": {
          "type": "string"
        },
        "localSubTotal": {
          "type": "number"
        },
        "localTax": {
          "type": "number"
        },
        "localTaxableAmt": {
          "type": "number"
        },
        "mainItem": {
          "type": "string"
        },
        "printOut": {
          "type": "string"
        },
        "qty": {
          "type": "number"
        },
        "seq": {
          "type": "integer"
        },
        "subTotal": {
          "type": "number"
        },
        "tax": {
          "type": "number"
        },
        "taxRate": {
          "type": "number"
        },
        "taxType": {
          "type": "string"
        },
        "taxableAmt": {
          "type": "number"
        },
        "transferable": {
          "type": "string"
        },
        "transferedQty": {
          "type": "number"
        },
        "unitPrice": {
          "type": "number"
        },
        "uom": {
          "type": "string"
        }
      }
    },
    "models.APCN": {
      "type": "object",
      "properties": {
        "cancelled": {
          "type": "string"
        },
        "cntype": {
          "type": "string"
        },
        "createdTimeStamp": {
          "type": "string"
        },
        "createdUserID": {
          "type": "string"
        },
        "creditorCode": {
          "type": "string"
        },
        "currencyCode": {
          "type": "string"
        },
        "currencyRate": {
          "type": "number"
        },
        "description": {
          "type": "string"
        },
        "details": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/models.APCNDTL"
          }
        },
        "docDate": {
          "type": "string"
        },
        "docKey": {
          "type": "integer"
        },
        "docNo": {
          "type": "string"
        },
        "docStatus": {
          "type": "string"
        },
        "inclusiveTax": {
          "type": "string"
        },
        "isJournal": {
          "type": "string"
        },
        "journalType": {
          "type": "string"
        },
        "knockOffAmt": {
          "type": "number"
        },
        "lastModified": {
          "type": "string"
        },
        "lastModifiedUserID": {
          "type": "string"
        },
        "localNetTotal": {
          "type": "number"
        },
        "localTax": {
          "type": "number"
        },
        "localTotal": {
          "type": "number"
        },
        "netTotal": {
          "type": "number"
        },
        "note": {
          "type": "string"
        },
        "printCount": {
          "type": "integer"
        },
        "reason": {
          "type": "string"
        },
        "ref": {
          "type": "string"
        },
        "refNo2": {
          "type": "string"
        },
        "refundAmt": {
          "type": "number"
        },
        "roundingMethod": {
          "type": "integer"
        },
        "supplierCNNo": {
          "type": "string"
        },
        "tax": {
          "type": "number"
        },
        "toTaxCurrencyRate": {
          "type": "number"
        },
        "total": {
          "type": "number"
        },
        "withholdingTaxRoundingMethod": {
          "type": "integer"
        }
      }
    },
    "models.APCNDTL": {
      "type": "object",
      "properties": {
        "accNo": {
          "type": "string"
        },
        "amount": {
          "type": "number"
        },
        "deptNo": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "docKey": {
          "type": "integer"
        },
        "dtlKey": {
          "type": "integer"
        },
        "knockOffAmount": {
          "type": "number"
        },
        "localNetAmount": {
          "type": "number"
        },
        "localSubTotal": {
          "type": "number"
        },
        "localTax": {
          "type": "number"
        },
        "localUnappliedAmount": {
          "type": "number"
        },
        "netAmount": {
          "type": "number"
        },
        "projNo": {
          "type": "string"
        },
        "seq": {
          "type": "integer"
        },
        "subTotal": {
          "type": "number"
        },
        "supplyPurchase": {
          "type": "string"
        },
        "tax": {
          "type": "number"
        },
        "taxCode": {
          "type": "string"
        },
        "taxRate": {
          "type": "number"
        },
        "taxableAmt": {
          "type": "number"
        },
        "toAccountRate": {
          "type": "number"
        },
        "unappliedAmount": {
          "type": "number"
        }
      }
    },
    "models.APDN": {
      "type": "object",
      "properties": {
        "cancelled": {
          "type": "string"
        },
        "createdTimeStamp": {
          "type": "string"
        },
        "createdUserID": {
          "type": "string"
        },
        "creditorCode": {
          "type": "string"
        },
        "currencyCode": {
          "type": "string"
        },
        "currencyRate": {
          "type": "number"
        },
        "description": {
          "type": "string"
        },
        "details": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/models.APDNDTL"
          }
        },
        "displayTerm": {
          "type": "string"
        },
        "dntype": {
          "type": "string"
        },
        "docDate": {
          "type": "string"
        },
        "docKey": {
          "type": "integer"
        },
        "docNo": {
          "type": "string"
        },
        "docStatus": {
          "type": "string"
        },
        "dueDate": {
          "type": "string"
        },
        "inclusiveTax": {
          "type": "string"
        },
        "isJournal": {
          "type": "string"
        },
        "journalType": {
          "type": "string"
        },
        "lastModified": {
          "type": "string"
        },
        "lastModifiedUserID": {
          "type": "string"
        },
        "localNetTotal": {
          "type": "number"
        },
        "localPaymentAmt": {
          "type": "number"
        },
        "localTax": {
          "type": "number"
        },
        "localTotal": {
          "type": "number"
        },
        "netTotal": {
          "type": "number"
        },
        "note": {
          "type": "string"
        },
        "outstanding": {
          "type": "number"
        },
        "paymentAmt": {
          "type": "number"
        },
        "printCount": {
          "type": "integer"
        },
        "purchaseAgent": {
          "type": "string"
        },
        "reason": {
          "type": "string"
        },
        "ref": {
          "type": "string"
        },
        "refNo2": {
          "type": "string"
        },
        "roundingMethod": {
          "type": "integer"
        },
        "supplierDNNo": {
          "type": "string"
        },
        "tax": {
          "type": "number"
        },
        "toTaxCurrencyRate": {
          "type": "number"
        },
        "total": {
          "type": "number"
        },
        "withholdingTaxRoundingMethod": {
          "type": "integer"
        },
        "withholdingTaxVersion": {
          "type": "integer"
        }
      }
    },
    "models.APDNDTL": {
      "type": "object",
      "properties": {
        "accNo": {
          "type": "string"
        },
        "amount": {
          "type": "number"
        },
        "deptNo": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "docKey": {
          "type": "integer"
        },
        "dtlKey": {
          "type": "integer"
        },
        "knockOffAmount": {
          "type": "number"
        },
        "localNetAmount": {
          "type": "number"
        },
        "localSubTotal": {
          "type": "number"
        },
        "localTax": {
          "type": "number"
        },
        "netAmount": {
          "type": "number"
        },
        "projNo": {
          "type": "string"
        },
        "seq": {
          "type": "integer"
        },
        "subTotal": {
          "type": "number"
        },
        "supplyPurchase": {
          "type": "string"
        },
        "tax": {
          "type": "number"
        },
        "taxCode": {
          "type": "string"
        },
        "taxRate": {
          "type": "number"
        },
        "taxableAmt": {
          "type": "number"
        },
        "toAccountRate": {
          "type": "number"
        }
      }
    },
    "models.APPayment": {
      "type": "object",
      "properties": {
        "cancelled": {
          "type": "string"
        },
        "cbkey": {
          "type": "integer"
        },
        "createdTimeStamp": {
          "type": "string"
        },
        "createdUserID": {
          "type": "string"
        },
        "creditorCode": {
          "type": "string"
        },
        "currencyCode": {
          "type": "string"
        },
        "deptNo": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "details": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/models.APPaymentDTL"
          }
        },
        "docDate": {
          "type": "string"
        },
        "docKey": {
          "type": "integer"
        },
        "docNo": {
          "type": "string"
        },
        "docStatus": {
          "type": "string"
        },
        "knockOffAmt": {
          "type": "number"
        },
        "lastModified": {
          "type": "string"
        },
        "lastModifiedUserID": {
          "type": "string"
        },
        "localPaymentAmt": {
          "type": "number"
        },
        "localUnappliedAmount": {
          "type": "number"
        },
        "note": {
          "type": "string"
        },
        "paymentAmt": {
          "type": "number"
        },
        "projNo": {
          "type": "string"
        },
        "refundAmt": {
          "type": "number"
        },
        "toCreditorRate": {
          "type": "number"
        },
        "toHomeRate": {
          "type": "number"
        },
        "withholdingTaxRoundingMethod": {
          "type": "integer"
        },
        "withholdingTaxVersion": {
          "type": "integer"
        }
      }
    },
    "models.APPaymentDTL": {
      "type": "object",
      "properties": {
        "bankCharge": {
          "type": "number"
        },
        "chequeNo": {
          "type": "string"
        },
        "creditorPaymentAmt": {
          "type": "number"
        },
        "docKey": {
          "type": "integer"
        },
        "dtlKey": {
          "type": "integer"
        },
        "floatDay": {
          "type": "integer"
        },
        "isRCHQ": {
          "type": "string"
        },
        "localPaymentAmt": {
          "type": "number"
        },
        "paymentAmt": {
          "type": "number"
        },
        "paymentBy": {
          "type": "string"
        },
        "paymentMethod": {
          "type": "string"
        },
        "rchqdate": {
          "type": "string"
        },
        "seq": {
          "type": "integer"
        },
        "toBankRate": {
          "type": "number"
        }
      }
    },
    "models.ARCN": {
      "type": "object",
      "properties": {
        "cancelled": {
          "type": "string"
        },
        "cntype": {
          "type": "string"
        },
        "consolidatedEInvoice": {
          "type": "string"
        },
        "createdTimeStamp": {
          "type": "string"
        },
        "createdUserID": {
          "type": "string"
        },
        "currencyCode": {
          "type": "string"
        },
        "currencyRate": {
          "type": "number"
        },
        "debtorCode": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "details": {
          "description": "loaded separately",
          "type": "array",
          "items": {
            "$ref": "#/definitions/models.ARCNDtl"
          }
        },
        "docDate": {
          "type": "string"
        },
        "docKey": {
          "type": "integer"
        },
        "docNo": {
          "type": "string"
        },
        "docStatus": {
          "type": "string"
        },
        "einvoiceSubmitDocType": {
          "type": "string"
        },
        "inclusiveTax": {
          "type": "string"
        },
        "isJournal": {
          "type": "string"
        },
        "journalType": {
          "type": "string"
        },
        "knockOffAmt": {
          "type": "number"
        },
        "lastModified": {
          "type": "string"
        },
        "lastModifiedUserID": {
          "type": "string"
        },
        "localNetTotal": {
          "type": "number"
        },
        "localTax": {
          "type": "number"
        },
        "localTotal": {
          "type": "number"
        },
        "netTotal": {
          "type": "number"
        },
        "printCount": {
          "type": "integer"
        },
        "ref": {
          "type": "string"
        },
        "roundingMethod": {
          "type": "integer"
        },
        "submitEInvoice": {
          "type": "string"
        },
        "tax": {
          "type": "number"
        },
        "toTaxCurrencyRate": {
          "type": "number"
        },
        "total": {
          "type": "number"
        },
        "withholdingTaxRoundingMethod": {
          "type": "integer"
        }
      }
    },
    "models.ARCNDtl": {
      "type": "object",
      "properties": {
        "accNo": {
          "type": "string"
        },
        "amount": {
          "type": "number"
        },
        "description": {
          "type": "string"
        },
        "docKey": {
          "type": "integer"
        },
        "dtlKey": {
          "type": "integer"
        },
        "localNetAmount": {
          "type": "number"
        },
        "localSubTotal": {
          "type": "number"
        },
        "localTax": {
          "type": "number"
        },
        "netAmount": {
          "type": "number"
        },
        "seq": {
          "type": "integer"
        },
        "subTotal": {
          "type": "number"
        },
        "supplyPurchase": {
          "type": "string"
        },
        "tax": {
          "type": "number"
        },
        "taxRate": {
          "type": "number"
        },
        "taxType": {
          "type": "string"
        },
        "toAccountRate": {
          "type": "number"
        }
      }
    },
    "models.ARDN": {
      "type": "object",
      "properties": {
        "cancelled": {
          "type": "string"
        },
        "createdTimeStamp": {
          "type": "string"
        },
        "createdUserID": {
          "type": "string"
        },
        "currencyCode": {
          "type": "string"
        },
        "currencyRate": {
          "type": "number"
        },
        "debtorCode": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "details": {
          "description": "loaded separately",
          "type": "array",
          "items": {
            "$ref": "#/definitions/models.ARDNDtl"
          }
        },
        "displayTerm": {
          "type": "string"
        },
        "dntype": {
          "type": "string"
        },
        "docDate": {
          "type": "string"
        },
        "docKey": {
          "type": "integer"
        },
        "docNo": {
          "type": "string"
        },
        "docStatus": {
          "type": "string"
        },
        "dueDate": {
          "type": "string"
        },
        "exTax": {
          "type": "number"
        },
        "inclusiveTax": {
          "type": "string"
        },
        "isJournal": {
          "type": "string"
        },
        "journalType": {
          "type": "string"
        },
        "lastModified": {
          "type": "string"
        },
        "lastModifiedUserID": {
          "type": "string"
        },
        "localExTax": {
          "type": "number"
        },
        "localNetTotal": {
          "type": "number"
        },
        "localPaymentAmt": {
          "type": "number"
        },
        "localTax": {
          "type": "number"
        },
        "localTaxableAmt": {
          "type": "number"
        },
        "localTotal": {
          "type": "number"
        },
        "netTotal": {
          "type": "number"
        },
        "note": {
          "type": "string"
        },
        "outstanding": {
          "type": "number"
        },
        "paymentAmt": {
          "type": "number"
        },
        "printCount": {
          "type": "integer"
        },
        "ref": {
          "type": "string"
        },
        "refNo2": {
          "type": "string"
        },
        "roundingMethod": {
          "type": "integer"
        },
        "salesAgent": {
          "type": "string"
        },
        "tax": {
          "type": "number"
        },
        "taxableAmt": {
          "type": "number"
        },
        "toTaxCurrencyRate": {
          "type": "number"
        },
        "total": {
          "type": "number"
        },
        "withholdingTaxRoundingMethod": {
          "type": "integer"
        },
        "withholdingTaxVersion": {
          "type": "integer"
        }
      }
    },
    "models.ARDNDtl": {
      "type": "object",
      "properties": {
        "accNo": {
          "type": "string"
        },
        "amount": {
          "type": "number"
        },
        "description": {
          "type": "string"
        },
        "docKey": {
          "type": "integer"
        },
        "dtlKey": {
          "type": "integer"
        },
        "knockOffAmount": {
          "type": "number"
        },
        "localNetAmount": {
          "type": "number"
        },
        "localSubTotal": {
          "type": "number"
        },
        "localTax": {
          "type": "number"
        },
        "localTaxableAmt": {
          "type": "number"
        },
        "netAmount": {
          "type": "number"
        },
        "seq": {
          "type": "integer"
        },
        "subTotal": {
          "type": "number"
        },
        "supplyPurchase": {
          "type": "string"
        },
        "tax": {
          "type": "number"
        },
        "taxRate": {
          "type": "number"
        },
        "taxType": {
          "type": "string"
        },
        "taxableAmt": {
          "type": "number"
        },
        "toAccountRate": {
          "type": "number"
        }
      }
    },
    "models.ARInvoice": {
      "type": "object",
      "properties": {
        "cancelled": {
          "description": "\"T\" or \"F\"",
          "type": "string"
        },
        "createdTimeStamp": {
          "type": "string"
        },
        "createdUserID": {
          "type": "string"
        },
        "currencyCode": {
          "type": "string"
        },
        "currencyRate": {
          "type": "number"
        },
        "debtorCode": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "details": {
          "description": "loaded separately",
          "type": "array",
          "items": {
            "$ref": "#/definitions/models.ARInvoiceDTL"
          }
        },
        "displayTerm": {
          "type": "string"
        },
        "docDate": {
          "type": "string"
        },
        "docKey": {
          "type": "integer"
        },
        "docNo": {
          "type": "string"
        },
        "docStatus": {
          "description": "\"A\" = active/posted",
          "type": "string"
        },
        "dueDate": {
          "type": "string"
        },
        "inclusiveTax": {
          "type": "string"
        },
        "journalType": {
          "type": "string"
        },
        "lastModified": {
          "type": "string"
        },
        "lastModifiedUserID": {
          "type": "string"
        },
        "localNetTotal": {
          "type": "number"
        },
        "localPaymentAmt": {
          "type": "number"
        },
        "localTax": {
          "type": "number"
        },
        "localTotal": {
          "type": "number"
        },
        "netTotal": {
          "type": "number"
        },
        "note": {
          "type": "string"
        },
        "outstanding": {
          "type": "number"
        },
        "paymentAmt": {
          "type": "number"
        },
        "refNo2": {
          "type": "string"
        },
        "roundingMethod": {
          "type": "integer"
        },
        "salesAgent": {
          "type": "string"
        },
        "tax": {
          "type": "number"
        },
        "toTaxCurrencyRate": {
          "type": "number"
        },
        "total": {
          "type": "number"
        },
        "withholdingTaxRoundingMethod": {
          "type": "integer"
        },
        "withholdingTaxVersion": {
          "type": "integer"
        }
      }
    },
    "models.ARInvoiceDTL": {
      "type": "object",
      "properties": {
        "accNo": {
          "type": "string"
        },
        "amount": {
          "type": "number"
        },
        "description": {
          "type": "string"
        },
        "docKey": {
          "type": "integer"
        },
        "dtlKey": {
          "type": "integer"
        },
        "knockOffAmount": {
          "type": "number"
        },
        "localNetAmount": {
          "type": "number"
        },
        "localSubTotal": {
          "type": "number"
        },
        "localTax": {
          "type": "number"
        },
        "netAmount": {
          "type": "number"
        },
        "seq": {
          "type": "integer"
        },
        "subTotal": {
          "type": "number"
        },
        "tax": {
          "type": "number"
        },
        "taxRate": {
          "type": "number"
        },
        "taxType": {
          "type": "string"
        },
        "taxableAmt": {
          "type": "number"
        },
        "toAccountRate": {
          "type": "number"
        }
      }
    },
    "models.ARPayment": {
      "type": "object",
      "properties": {
        "cancelled": {
          "type": "string"
        },
        "createdTimeStamp": {
          "type": "string"
        },
        "createdUserID": {
          "type": "string"
        },
        "currencyCode": {
          "type": "string"
        },
        "debtorCode": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "details": {
          "description": "loaded separately",
          "type": "array",
          "items": {
            "$ref": "#/definitions/models.ARPaymentDTL"
          }
        },
        "docDate": {
          "type": "string"
        },
        "docKey": {
          "type": "integer"
        },
        "docNo": {
          "type": "string"
        },
        "docStatus": {
          "type": "string"
        },
        "knockOffAmt": {
          "type": "number"
        },
        "lastModified": {
          "type": "string"
        },
        "lastModifiedUserID": {
          "type": "string"
        },
        "localPaymentAmt": {
          "type": "number"
        },
        "note": {
          "type": "string"
        },
        "paymentAmt": {
          "type": "number"
        },
        "toDebtorRate": {
          "type": "number"
        },
        "toHomeRate": {
          "type": "number"
        },
        "withholdingTaxRoundingMethod": {
          "type": "integer"
        },
        "withholdingTaxVersion": {
          "type": "integer"
        }
      }
    },
    "models.ARPaymentDTL": {
      "type": "object",
      "properties": {
        "chequeNo": {
          "type": "string"
        },
        "debtorPaymentAmt": {
          "type": "number"
        },
        "docKey": {
          "type": "integer"
        },
        "dtlKey": {
          "type": "integer"
        },
        "isRCHQ": {
          "type": "string"
        },
        "localPaymentAmt": {
          "type": "number"
        },
        "paymentAmt": {
          "type": "number"
        },
        "paymentBy": {
          "type": "string"
        },
        "paymentMethod": {
          "type": "string"
        },
        "seq": {
          "type": "integer"
        },
        "toBankRate": {
          "type": "number"
        }
      }
    },
    "models.ARRefund": {
      "type": "object",
      "properties": {
        "branchCode": {
          "type": "string"
        },
        "cancelled": {
          "type": "string"
        },
        "cbkey": {
          "type": "integer"
        },
        "createdTimeStamp": {
          "type": "string"
        },
        "createdUserID": {
          "type": "string"
        },
        "currencyCode": {
          "type": "string"
        },
        "debtorCode": {
          "type": "string"
        },
        "deptNo": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "details": {
          "description": "loaded separately",
          "type": "array",
          "items": {
            "$ref": "#/definitions/models.ARRefundDTL"
          }
        },
        "docDate": {
          "type": "string"
        },
        "docKey": {
          "type": "integer"
        },
        "docNo": {
          "type": "string"
        },
        "docNo2": {
          "type": "string"
        },
        "docStatus": {
          "type": "string"
        },
        "einvoiceStatus": {
          "type": "string"
        },
        "expiryTimeStamp": {
          "type": "string"
        },
        "externalLink": {
          "type": "string"
        },
        "gltrxID": {
          "type": "integer"
        },
        "handOverDate": {
          "type": "string"
        },
        "knockOffAmt": {
          "type": "number"
        },
        "knockOffs": {
          "description": "loaded separately",
          "type": "array",
          "items": {
            "$ref": "#/definitions/models.ARRefundKnockOff"
          }
        },
        "lastModified": {
          "type": "string"
        },
        "lastModifiedUserID": {
          "type": "string"
        },
        "localPaymentAmt": {
          "type": "number"
        },
        "localWithholdingTax": {
          "type": "number"
        },
        "note": {
          "type": "string"
        },
        "paymentAmt": {
          "type": "number"
        },
        "projNo": {
          "type": "string"
        },
        "referenceInvoiceNo": {
          "type": "string"
        },
        "revalueRate": {
          "type": "number"
        },
        "sourceKey": {
          "type": "integer"
        },
        "sourceType": {
          "type": "string"
        },
        "submitEInvoice": {
          "type": "string"
        },
        "taxCurrencyWithholdingTax": {
          "type": "number"
        },
        "toDebtorRate": {
          "type": "number"
        },
        "toHomeRate": {
          "type": "number"
        },
        "withholdingTax": {
          "type": "number"
        },
        "withholdingTaxVersion": {
          "type": "integer"
        }
      }
    },
    "models.ARRefundDTL": {
      "type": "object",
      "properties": {
        "bankCharge": {
          "type": "number"
        },
        "bankChargeDtlKey": {
          "type": "integer"
        },
        "chequeNo": {
          "type": "string"
        },
        "debtorPaymentAmt": {
          "type": "number"
        },
        "docKey": {
          "type": "integer"
        },
        "dtlKey": {
          "type": "integer"
        },
        "floatDay": {
          "type": "integer"
        },
        "isRCHQ": {
          "type": "string"
        },
        "localPaymentAmt": {
          "type": "number"
        },
        "paymentAmt": {
          "type": "number"
        },
        "paymentBy": {
          "type": "string"
        },
        "paymentMethod": {
          "type": "string"
        },
        "rchqdate": {
          "type": "string"
        },
        "seq": {
          "type": "integer"
        },
        "toBankRate": {
          "type": "number"
        }
      }
    },
    "models.ARRefundKnockOff": {
      "type": "object",
      "properties": {
        "amount": {
          "type": "number"
        },
        "deptNo": {
          "type": "string"
        },
        "docKey": {
          "type": "integer"
        },
        "fcrevalueKey": {
          "type": "integer"
        },
        "gainLossDate": {
          "type": "string"
        },
        "knockOffDocKey": {
          "type": "integer"
        },
        "knockOffDocType": {
          "type": "string"
        },
        "knockOffKey": {
          "type": "integer"
        },
        "projNo": {
          "type": "string"
        },
        "revalue": {
          "type": "string"
        },
        "useProjDept": {
          "type": "string"
        }
      }
    },
    "models.CB": {
      "type": "object",
      "properties": {
        "cancelled": {
          "type": "string"
        },
        "createdTimeStamp": {
          "type": "string"
        },
        "createdUserID": {
          "type": "string"
        },
        "currencyCode": {
          "type": "string"
        },
        "currencyRate": {
          "type": "number"
        },
        "dealWith": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "details": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/models.CBDTL"
          }
        },
        "docDate": {
          "type": "string"
        },
        "docKey": {
          "type": "integer"
        },
        "docNo": {
          "type": "string"
        },
        "docStatus": {
          "type": "string"
        },
        "docType": {
          "type": "string"
        },
        "inclusiveTax": {
          "type": "string"
        },
        "lastModified": {
          "type": "string"
        },
        "lastModifiedUserID": {
          "type": "string"
        },
        "localNetTotal": {
          "type": "number"
        },
        "localTax": {
          "type": "number"
        },
        "localTotal": {
          "type": "number"
        },
        "netTotal": {
          "type": "number"
        },
        "note": {
          "type": "string"
        },
        "paymentDetails": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/models.CBPaymentDTL"
          }
        },
        "printCount": {
          "type": "integer"
        },
        "roundingMethod": {
          "type": "integer"
        },
        "tax": {
          "type": "number"
        },
        "toTaxCurrencyRate": {
          "type": "number"
        },
        "total": {
          "type": "number"
        },
        "totalPayment": {
          "type": "number"
        },
        "withholdingTaxRoundingMethod": {
          "type": "integer"
        },
        "withholdingTaxVersion": {
          "type": "integer"
        }
      }
    },
    "models.CBDTL": {
      "type": "object",
      "properties": {
        "accNo": {
          "type": "string"
        },
        "amount": {
          "type": "number"
        },
        "deptNo": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "docKey": {
          "type": "integer"
        },
        "dtlKey": {
          "type": "integer"
        },
        "furtherDescription": {
          "type": "string"
        },
        "inclusiveTax": {
          "type": "string"
        },
        "localAmount": {
          "type": "number"
        },
        "localTax": {
          "type": "number"
        },
        "projNo": {
          "type": "string"
        },
        "seq": {
          "type": "integer"
        },
        "tax": {
          "type": "number"
        },
        "taxCode": {
          "type": "string"
        },
        "taxPermitNo": {
          "type": "string"
        },
        "taxRate": {
          "type": "number"
        },
        "taxableAmt": {
          "type": "number"
        },
        "toAccountRate": {
          "type": "number"
        }
      }
    },
    "models.CBPaymentDTL": {
      "type": "object",
      "properties": {
        "bankCharge": {
          "type": "number"
        },
        "chequeNo": {
          "type": "string"
        },
        "docKey": {
          "type": "integer"
        },
        "dtlKey": {
          "type": "integer"
        },
        "floatDay": {
          "type": "integer"
        },
        "isRCHQ": {
          "type": "string"
        },
        "paymentAmt": {
          "type": "number"
        },
        "paymentBy": {
          "type": "string"
        },
        "paymentMethod": {
          "type": "string"
        },
        "rchqdate": {
          "type": "string"
        },
        "seq": {
          "type": "integer"
        },
        "toBankRate": {
          "type": "number"
        }
      }
    },
    "models.CP": {
      "type": "object",
      "properties": {
        "cancelled": {
          "type": "string"
        },
        "createdTimeStamp": {
          "type": "string"
        },
        "createdUserID": {
          "type": "string"
        },
        "creditorCode": {
          "type": "string"
        },
        "creditorName": {
          "type": "string"
        },
        "currencyCode": {
          "type": "string"
        },
        "currencyRate": {
          "type": "number"
        },
        "description": {
          "type": "string"
        },
        "details": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/models.CPDTL"
          }
        },
        "displayTerm": {
          "type": "string"
        },
        "docDate": {
          "type": "string"
        },
        "docKey": {
          "type": "integer"
        },
        "docNo": {
          "type": "string"
        },
        "lastModified": {
          "type": "string"
        },
        "lastModifiedUserID": {
          "type": "string"
        },
        "netTotal": {
          "type": "number"
        },
        "note": {
          "type": "string"
        },
        "paymentAmt": {
          "type": "number"
        },
        "paymentMethod": {
          "type": "string"
        },
        "printCount": {
          "type": "integer"
        },
        "purchaseAgent": {
          "type": "string"
        },
        "ref": {
          "type": "string"
        },
        "total": {
          "type": "number"
        }
      }
    },
    "models.CPDTL": {
      "type": "object",
      "properties": {
        "batchNo": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "discount": {
          "type": "string"
        },
        "docKey": {
          "type": "integer"
        },
        "dtlKey": {
          "type": "integer"
        },
        "itemCode": {
          "type": "string"
        },
        "location": {
          "type": "string"
        },
        "qty": {
          "type": "number"
        },
        "seq": {
          "type": "integer"
        },
        "subTotal": {
          "type": "number"
        },
        "taxCode": {
          "type": "string"
        },
        "taxRate": {
          "type": "number"
        },
        "unitPrice": {
          "type": "number"
        },
        "uom": {
          "type": "string"
        }
      }
    },
    "models.CS": {
      "type": "object",
      "properties": {
        "canSync": {
          "type": "string"
        },
        "cancelled": {
          "type": "string"
        },
        "createdTimeStamp": {
          "type": "string"
        },
        "createdUserID": {
          "type": "string"
        },
        "currencyCode": {
          "type": "string"
        },
        "currencyRate": {
          "type": "number"
        },
        "debtorCode": {
          "type": "string"
        },
        "debtorName": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "details": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/models.CSDTL"
          }
        },
        "displayTerm": {
          "type": "string"
        },
        "docDate": {
          "type": "string"
        },
        "docKey": {
          "type": "integer"
        },
        "docNo": {
          "type": "string"
        },
        "docStatus": {
          "type": "string"
        },
        "inclusiveTax": {
          "type": "string"
        },
        "isRoundAdj": {
          "type": "string"
        },
        "journalType": {
          "type": "string"
        },
        "lastModified": {
          "type": "string"
        },
        "lastModifiedUserID": {
          "type": "string"
        },
        "lastUpdate": {
          "type": "integer"
        },
        "localNetTotal": {
          "type": "number"
        },
        "localPaymentAmt": {
          "type": "number"
        },
        "localTax": {
          "type": "number"
        },
        "localTotal": {
          "type": "number"
        },
        "netTotal": {
          "type": "number"
        },
        "note": {
          "type": "string"
        },
        "paymentAmt": {
          "type": "number"
        },
        "paymentMethod": {
          "type": "string"
        },
        "printCount": {
          "type": "integer"
        },
        "ref": {
          "type": "string"
        },
        "roundingMethod": {
          "type": "integer"
        },
        "salesAgent": {
          "type": "string"
        },
        "tax": {
          "type": "number"
        },
        "toTaxCurrencyRate": {
          "type": "number"
        },
        "total": {
          "type": "number"
        }
      }
    },
    "models.CSDTL": {
      "type": "object",
      "properties": {
        "description": {
          "type": "string"
        },
        "discount": {
          "type": "string"
        },
        "docKey": {
          "type": "integer"
        },
        "dtlKey": {
          "type": "integer"
        },
        "itemCode": {
          "type": "string"
        },
        "qty": {
          "type": "number"
        },
        "seq": {
          "type": "integer"
        },
        "subTotal": {
          "type": "number"
        },
        "taxCode": {
          "type": "string"
        },
        "taxRate": {
          "type": "number"
        },
        "unitPrice": {
          "type": "number"
        },
        "uom": {
          "type": "string"
        }
      }
    },
    "models.DO": {
      "type": "object",
      "properties": {
        "branchCode": {
          "type": "string"
        },
        "canSync": {
          "type": "string"
        },
        "cancelled": {
          "type": "string"
        },
        "cc": {
          "description": "CurrencyCode",
          "type": "string"
        },
        "consolidatedEInvoice": {
          "type": "string"
        },
        "createdTimeStamp": {
          "type": "string"
        },
        "createdUserID": {
          "type": "string"
        },
        "debtorCode": {
          "type": "string"
        },
        "debtorName": {
          "type": "string"
        },
        "deliveryTerm": {
          "type": "string"
        },
        "details": {
          "description": "loaded separately",
          "type": "array",
          "items": {
            "$ref": "#/definitions/models.DODtl"
          }
        },
        "displayTerm": {
          "type": "string"
        },
        "docDate": {
          "type": "string"
        },
        "docKey": {
          "type": "integer"
        },
        "docNo": {
          "type": "string"
        },
        "docStatus": {
          "type": "string"
        },
        "exTax": {
          "type": "number"
        },
        "finalTotal": {
          "type": "number"
        },
        "inclusiveTax": {
          "type": "string"
        },
        "invAddr1": {
          "type": "string"
        },
        "invAddr2": {
          "type": "string"
        },
        "invAddr3": {
          "type": "string"
        },
        "invAddr4": {
          "type": "string"
        },
        "isRoundAdj": {
          "type": "string"
        },
        "journalType": {
          "type": "string"
        },
        "lastModified": {
          "type": "string"
        },
        "lastModifiedUserID": {
          "type": "string"
        },
        "lastUpdate": {
          "type": "integer"
        },
        "localExTax": {
          "type": "number"
        },
        "localNetTotal": {
          "type": "number"
        },
        "localTax": {
          "type": "number"
        },
        "localTaxableAmt": {
          "type": "number"
        },
        "localTotal": {
          "type": "number"
        },
        "multiPrice": {
          "type": "string"
        },
        "netTotal": {
          "type": "number"
        },
        "paymentTerm": {
          "type": "string"
        },
        "printCount": {
          "type": "integer"
        },
        "roundingMethod": {
          "type": "integer"
        },
        "salesAgent": {
          "type": "string"
        },
        "salesLocation": {
          "type": "string"
        },
        "shipInfo": {
          "type": "string"
        },
        "shipVia": {
          "type": "string"
        },
        "submitEInvoice": {
          "type": "string"
        },
        "tax": {
          "type": "number"
        },
        "taxableAmt": {
          "type": "number"
        },
        "toTaxCurrencyRate": {
          "type": "number"
        },
        "total": {
          "type": "number"
        },
        "transferable": {
          "type": "string"
        },
        "validity": {
          "type": "string"
        }
      }
    },
    "models.DODtl": {
      "type": "object",
      "properties": {
        "addToSubTotal": {
          "type": "string"
        },
        "deliveryDate": {
          "type": "string"
        },
        "deptNo": {
          "type": "string"
        },
        "desc2": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "discount": {
          "type": "string"
        },
        "discountAmt": {
          "type": "number"
        },
        "docKey": {
          "type": "integer"
        },
        "dtlKey": {
          "type": "integer"
        },
        "furtherDescription": {
          "type": "string"
        },
        "itemCode": {
          "type": "string"
        },
        "localSubTotal": {
          "type": "number"
        },
        "localTax": {
          "type": "number"
        },
        "localTaxableAmt": {
          "type": "number"
        },
        "location": {
          "type": "string"
        },
        "mainItem": {
          "type": "string"
        },
        "printOut": {
          "type": "string"
        },
        "projNo": {
          "type": "string"
        },
        "qty": {
          "type": "number"
        },
        "salesExemptionNo": {
          "type": "string"
        },
        "seq": {
          "type": "integer"
        },
        "subTotal": {
          "type": "number"
        },
        "tax": {
          "type": "number"
        },
        "taxRate": {
          "type": "number"
        },
        "taxType": {
          "type": "string"
        },
        "taxableAmt": {
          "type": "number"
        },
        "transferable": {
          "type": "string"
        },
        "transferedQty": {
          "type": "number"
        },
        "unitPrice": {
          "type": "number"
        },
        "uom": {
          "type": "string"
        }
      }
    },
    "models.Debtor": {
      "type": "object",
      "properties": {
        "accNo": {
          "type": "string"
        },
        "accountGroup": {
          "type": "string"
        },
        "address1": {
          "type": "string"
        },
        "address2": {
          "type": "string"
        },
        "address3": {
          "type": "string"
        },
        "address4": {
          "type": "string"
        },
        "agingOn": {
          "type": "string"
        },
        "allowChangeMultiPrice": {
          "type": "string"
        },
        "allowExceedCreditLimit": {
          "description": "NOT NULL",
          "type": "string"
        },
        "areaCode": {
          "type": "string"
        },
        "attention": {
          "type": "string"
        },
        "autoKey": {
          "type": "integer"
        },
        "calcDiscountOnUnitPrice": {
          "type": "string"
        },
        "companyName": {
          "type": "string"
        },
        "contactInfo": {
          "type": "string"
        },
        "createdTimeStamp": {
          "type": "string"
        },
        "createdUserID": {
          "type": "string"
        },
        "creditLimit": {
          "type": "number"
        },
        "currencyCode": {
          "type": "string"
        },
        "debtorType": {
          "type": "string"
        },
        "deliverAddr1": {
          "description": "Additional fields for CRUD operations",
          "type": "string"
        },
        "deliverAddr2": {
          "type": "string"
        },
        "deliverAddr3": {
          "type": "string"
        },
        "deliverAddr4": {
          "type": "string"
        },
        "deliverPostCode": {
          "type": "string"
        },
        "desc2": {
          "type": "string"
        },
        "detailDiscount": {
          "type": "string"
        },
        "discountPercent": {
          "description": "NOT NULL",
          "type": "number"
        },
        "displayTerm": {
          "description": "NOT NULL in DB",
          "type": "string"
        },
        "doNotSubmitEInvoice": {
          "type": "string"
        },
        "emailAddress": {
          "type": "string"
        },
        "exemptNo": {
          "type": "string"
        },
        "expiryDate": {
          "type": "string"
        },
        "fax1": {
          "type": "string"
        },
        "fax2": {
          "type": "string"
        },
        "guid": {
          "type": "string"
        },
        "hasBonusPoint": {
          "description": "NOT NULL",
          "type": "string"
        },
        "inclusiveTax": {
          "description": "NOT NULL",
          "type": "string"
        },
        "isActive": {
          "description": "\"T\" = active, \"F\" = inactive",
          "type": "string"
        },
        "isCashSaleDebtor": {
          "type": "string"
        },
        "isGroupCompany": {
          "description": "NOT NULL",
          "type": "string"
        },
        "isTaxRegistered": {
          "type": "string"
        },
        "lastModified": {
          "type": "string"
        },
        "lastModifiedUserID": {
          "type": "string"
        },
        "lastUpdate": {
          "description": "NOT NULL",
          "type": "integer"
        },
        "markupRatio": {
          "type": "number"
        },
        "mobile": {
          "type": "string"
        },
        "multiPrice": {
          "type": "string"
        },
        "natureOfBusiness": {
          "type": "string"
        },
        "note": {
          "type": "string"
        },
        "openingBonusPoint": {
          "type": "number"
        },
        "overdueLimit": {
          "type": "number"
        },
        "phone1": {
          "type": "string"
        },
        "phone2": {
          "type": "string"
        },
        "postCode": {
          "type": "string"
        },
        "priceCategory": {
          "type": "string"
        },
        "registerNo": {
          "type": "string"
        },
        "roundingMethod": {
          "description": "NOT NULL",
          "type": "integer"
        },
        "salesAgent": {
          "type": "string"
        },
        "selfBilledApprovalNo": {
          "type": "string"
        },
        "sgeinvoiceBusinessUnit": {
          "type": "string"
        },
        "sgeinvoicePeppolID": {
          "type": "string"
        },
        "statementType": {
          "type": "string"
        },
        "taxCode": {
          "type": "string"
        },
        "taxRegisterNo": {
          "type": "string"
        },
        "webURL": {
          "type": "string"
        },
        "withholdingTaxCode": {
          "type": "string"
        }
      }
    },
    "models.ISS": {
      "type": "object",
      "properties": {
        "cancelled": {
          "type": "string"
        },
        "createdTimeStamp": {
          "type": "string"
        },
        "createdUserID": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "details": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/models.ISSDTL"
          }
        },
        "docDate": {
          "type": "string"
        },
        "docKey": {
          "type": "integer"
        },
        "docNo": {
          "type": "string"
        },
        "lastModified": {
          "type": "string"
        },
        "lastModifiedUserID": {
          "type": "string"
        },
        "note": {
          "type": "string"
        },
        "printCount": {
          "type": "integer"
        },
        "refDocNo": {
          "type": "string"
        },
        "remark1": {
          "type": "string"
        },
        "total": {
          "type": "number"
        }
      }
    },
    "models.ISSDTL": {
      "type": "object",
      "properties": {
        "batchNo": {
          "type": "string"
        },
        "deptNo": {
          "type": "string"
        },
        "desc2": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "docKey": {
          "type": "integer"
        },
        "dtlKey": {
          "type": "integer"
        },
        "furtherDescription": {
          "type": "string"
        },
        "itemCode": {
          "type": "string"
        },
        "location": {
          "type": "string"
        },
        "printOut": {
          "type": "string"
        },
        "projNo": {
          "type": "string"
        },
        "qty": {
          "type": "number"
        },
        "seq": {
          "type": "integer"
        },
        "subTotal": {
          "type": "number"
        },
        "unitCost": {
          "type": "number"
        },
        "uom": {
          "type": "string"
        }
      }
    },
    "models.PI": {
      "type": "object",
      "properties": {
        "cancelled": {
          "type": "string"
        },
        "createdTimeStamp": {
          "type": "string"
        },
        "createdUserID": {
          "type": "string"
        },
        "creditorCode": {
          "type": "string"
        },
        "creditorName": {
          "type": "string"
        },
        "currencyCode": {
          "type": "string"
        },
        "currencyRate": {
          "type": "number"
        },
        "description": {
          "type": "string"
        },
        "details": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/models.PIDTL"
          }
        },
        "displayTerm": {
          "type": "string"
        },
        "docDate": {
          "type": "string"
        },
        "docKey": {
          "type": "integer"
        },
        "docNo": {
          "type": "string"
        },
        "lastModified": {
          "type": "string"
        },
        "lastModifiedUserID": {
          "type": "string"
        },
        "netTotal": {
          "type": "number"
        },
        "note": {
          "type": "string"
        },
        "postToGL": {
          "type": "string"
        },
        "postToStock": {
          "type": "string"
        },
        "printCount": {
          "type": "integer"
        },
        "purchaseAgent": {
          "type": "string"
        },
        "ref": {
          "type": "string"
        },
        "refDocNo": {
          "type": "string"
        },
        "refNo2": {
          "type": "string"
        },
        "supplierDONo": {
          "type": "string"
        },
        "supplierInvoiceNo": {
          "type": "string"
        },
        "total": {
          "type": "number"
        },
        "transferable": {
          "type": "string"
        }
      }
    },
    "models.PIDTL": {
      "type": "object",
      "properties": {
        "batchNo": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "discount": {
          "type": "string"
        },
        "docKey": {
          "type": "integer"
        },
        "dtlKey": {
          "type": "integer"
        },
        "itemCode": {
          "type": "string"
        },
        "location": {
          "type": "string"
        },
        "qty": {
          "type": "number"
        },
        "seq": {
          "type": "integer"
        },
        "subTotal": {
          "type": "number"
        },
        "taxCode": {
          "type": "string"
        },
        "taxRate": {
          "type": "number"
        },
        "unitPrice": {
          "type": "number"
        },
        "uom": {
          "type": "string"
        }
      }
    },
    "models.PO": {
      "type": "object",
      "properties": {
        "cancelled": {
          "type": "string"
        },
        "createdTimeStamp": {
          "type": "string"
        },
        "createdUserID": {
          "type": "string"
        },
        "creditorCode": {
          "type": "string"
        },
        "creditorName": {
          "type": "string"
        },
        "currencyCode": {
          "type": "string"
        },
        "currencyRate": {
          "type": "number"
        },
        "description": {
          "type": "string"
        },
        "details": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/models.PODTL"
          }
        },
        "displayTerm": {
          "type": "string"
        },
        "docDate": {
          "type": "string"
        },
        "docKey": {
          "type": "integer"
        },
        "docNo": {
          "type": "string"
        },
        "lastModified": {
          "type": "string"
        },
        "lastModifiedUserID": {
          "type": "string"
        },
        "netTotal": {
          "type": "number"
        },
        "note": {
          "type": "string"
        },
        "printCount": {
          "type": "integer"
        },
        "purchaseAgent": {
          "type": "string"
        },
        "ref": {
          "type": "string"
        },
        "refDocNo": {
          "type": "string"
        },
        "total": {
          "type": "number"
        },
        "transferable": {
          "type": "string"
        }
      }
    },
    "models.PODTL": {
      "type": "object",
      "properties": {
        "batchNo": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "discount": {
          "type": "string"
        },
        "docKey": {
          "type": "integer"
        },
        "dtlKey": {
          "type": "integer"
        },
        "itemCode": {
          "type": "string"
        },
        "location": {
          "type": "string"
        },
        "qty": {
          "type": "number"
        },
        "seq": {
          "type": "integer"
        },
        "subTotal": {
          "type": "number"
        },
        "taxCode": {
          "type": "string"
        },
        "taxRate": {
          "type": "number"
        },
        "unitPrice": {
          "type": "number"
        },
        "uom": {
          "type": "string"
        }
      }
    },
    "models.PR": {
      "type": "object",
      "properties": {
        "cancelled": {
          "type": "string"
        },
        "createdTimeStamp": {
          "type": "string"
        },
        "createdUserID": {
          "type": "string"
        },
        "creditorCode": {
          "type": "string"
        },
        "creditorName": {
          "type": "string"
        },
        "currencyCode": {
          "type": "string"
        },
        "currencyRate": {
          "type": "number"
        },
        "description": {
          "type": "string"
        },
        "details": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/models.PRDTL"
          }
        },
        "displayTerm": {
          "type": "string"
        },
        "docDate": {
          "type": "string"
        },
        "docKey": {
          "type": "integer"
        },
        "docNo": {
          "type": "string"
        },
        "lastModified": {
          "type": "string"
        },
        "lastModifiedUserID": {
          "type": "string"
        },
        "netTotal": {
          "type": "number"
        },
        "note": {
          "type": "string"
        },
        "postToGL": {
          "type": "string"
        },
        "postToStock": {
          "type": "string"
        },
        "printCount": {
          "type": "integer"
        },
        "purchaseAgent": {
          "type": "string"
        },
        "ref": {
          "type": "string"
        },
        "refDocNo": {
          "type": "string"
        },
        "refNo2": {
          "type": "string"
        },
        "supplierDONo": {
          "type": "string"
        },
        "supplierInvoiceNo": {
          "type": "string"
        },
        "total": {
          "type": "number"
        }
      }
    },
    "models.PRDTL": {
      "type": "object",
      "properties": {
        "batchNo": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "discount": {
          "type": "string"
        },
        "docKey": {
          "type": "integer"
        },
        "dtlKey": {
          "type": "integer"
        },
        "itemCode": {
          "type": "string"
        },
        "location": {
          "type": "string"
        },
        "qty": {
          "type": "number"
        },
        "seq": {
          "type": "integer"
        },
        "subTotal": {
          "type": "number"
        },
        "taxCode": {
          "type": "string"
        },
        "taxRate": {
          "type": "number"
        },
        "unitPrice": {
          "type": "number"
        },
        "uom": {
          "type": "string"
        }
      }
    },
    "models.RCV": {
      "type": "object",
      "properties": {
        "cancelled": {
          "type": "string"
        },
        "createdTimeStamp": {
          "type": "string"
        },
        "createdUserID": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "details": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/models.RCVDTL"
          }
        },
        "docDate": {
          "type": "string"
        },
        "docKey": {
          "type": "integer"
        },
        "docNo": {
          "type": "string"
        },
        "lastModified": {
          "type": "string"
        },
        "lastModifiedUserID": {
          "type": "string"
        },
        "note": {
          "type": "string"
        },
        "printCount": {
          "type": "integer"
        },
        "refDocNo": {
          "type": "string"
        },
        "remark1": {
          "type": "string"
        },
        "total": {
          "type": "number"
        }
      }
    },
    "models.RCVDTL": {
      "type": "object",
      "properties": {
        "batchNo": {
          "type": "string"
        },
        "deptNo": {
          "type": "string"
        },
        "desc2": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "docKey": {
          "type": "integer"
        },
        "dtlKey": {
          "type": "integer"
        },
        "furtherDescription": {
          "type": "string"
        },
        "itemCode": {
          "type": "string"
        },
        "location": {
          "type": "string"
        },
        "printOut": {
          "type": "string"
        },
        "projNo": {
          "type": "string"
        },
        "qty": {
          "type": "number"
        },
        "seq": {
          "type": "integer"
        },
        "subTotal": {
          "type": "number"
        },
        "unitCost": {
          "type": "number"
        },
        "uom": {
          "type": "string"
        }
      }
    },
    "models.RQ": {
      "type": "object",
      "properties": {
        "cancelled": {
          "type": "string"
        },
        "createdTimeStamp": {
          "type": "string"
        },
        "createdUserID": {
          "type": "string"
        },
        "creditorCode": {
          "type": "string"
        },
        "creditorName": {
          "type": "string"
        },
        "currencyCode": {
          "type": "string"
        },
        "currencyRate": {
          "type": "number"
        },
        "description": {
          "type": "string"
        },
        "details": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/models.RQDTL"
          }
        },
        "displayTerm": {
          "type": "string"
        },
        "docDate": {
          "type": "string"
        },
        "docKey": {
          "type": "integer"
        },
        "docNo": {
          "type": "string"
        },
        "lastModified": {
          "type": "string"
        },
        "lastModifiedUserID": {
          "type": "string"
        },
        "netTotal": {
          "type": "number"
        },
        "note": {
          "type": "string"
        },
        "printCount": {
          "type": "integer"
        },
        "purchaseAgent": {
          "type": "string"
        },
        "ref": {
          "type": "string"
        },
        "total": {
          "type": "number"
        },
        "transferable": {
          "type": "string"
        }
      }
    },
    "models.RQDTL": {
      "type": "object",
      "properties": {
        "batchNo": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "discount": {
          "type": "string"
        },
        "docKey": {
          "type": "integer"
        },
        "dtlKey": {
          "type": "integer"
        },
        "itemCode": {
          "type": "string"
        },
        "location": {
          "type": "string"
        },
        "qty": {
          "type": "number"
        },
        "seq": {
          "type": "integer"
        },
        "subTotal": {
          "type": "number"
        },
        "taxCode": {
          "type": "string"
        },
        "taxRate": {
          "type": "number"
        },
        "unitPrice": {
          "type": "number"
        },
        "uom": {
          "type": "string"
        }
      }
    },
    "models.TaxEntity": {
      "type": "object",
      "properties": {
        "address": {
          "type": "string"
        },
        "businessActivityDesc": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "countryCode": {
          "type": "string"
        },
        "createdTimeStamp": {
          "type": "string"
        },
        "createdUserID": {
          "type": "string"
        },
        "emailAddress": {
          "type": "string"
        },
        "fullTIN": {
          "type": "string"
        },
        "gstregisterNo": {
          "type": "string"
        },
        "guid": {
          "type": "string"
        },
        "identityNo": {
          "type": "string"
        },
        "isActive": {
          "type": "string"
        },
        "lastModified": {
          "type": "string"
        },
        "lastModifiedUserID": {
          "type": "string"
        },
        "msiccode": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "phone": {
          "type": "string"
        },
        "postCode": {
          "type": "string"
        },
        "sstregisterNo": {
          "type": "string"
        },
        "stateCode": {
          "type": "string"
        },
        "taxBranchID": {
          "type": "string"
        },
        "taxCategory": {
          "type": "integer"
        },
        "taxClassification": {
          "type": "integer"
        },
        "taxEntityID": {
          "type": "integer"
        },
        "tin": {
          "type": "string"
        },
        "tourismTaxRegisterNo": {
          "type": "string"
        },
        "tradeName": {
          "type": "string"
        }
      }
    },
    "models.XFER": {
      "type": "object",
      "properties": {
        "authorisedBy": {
          "type": "string"
        },
        "cancelled": {
          "type": "string"
        },
        "createdTimeStamp": {
          "type": "string"
        },
        "createdUserID": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "details": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/models.XFERDTL"
          }
        },
        "docDate": {
          "type": "string"
        },
        "docKey": {
          "type": "integer"
        },
        "docNo": {
          "type": "string"
        },
        "fromLocation": {
          "type": "string"
        },
        "lastModified": {
          "type": "string"
        },
        "lastModifiedUserID": {
          "type": "string"
        },
        "note": {
          "type": "string"
        },
        "printCount": {
          "type": "integer"
        },
        "reason": {
          "type": "string"
        },
        "ref": {
          "type": "string"
        },
        "refDocNo": {
          "type": "string"
        },
        "toLocation": {
          "type": "string"
        },
        "total": {
          "type": "number"
        }
      }
    },
    "models.XFERDTL": {
      "type": "object",
      "properties": {
        "batchNo": {
          "type": "string"
        },
        "deptNo": {
          "type": "string"
        },
        "desc2": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "docKey": {
          "type": "integer"
        },
        "dtlKey": {
          "type": "integer"
        },
        "furtherDescription": {
          "type": "string"
        },
        "inDtlKey": {
          "type": "integer"
        },
        "itemCode": {
          "type": "string"
        },
        "printOut": {
          "type": "string"
        },
        "projNo": {
          "type": "string"
        },
        "qty": {
          "type": "number"
        },
        "seq": {
          "type": "integer"
        },
        "subTotal": {
          "type": "number"
        },
        "unitCost": {
          "type": "number"
        },
        "uom": {
          "type": "string"
        }
      }
    }
  },
  "securityDefinitions": {
    "BearerAuth": {
      "type": "apiKey",
      "name": "Authorization",
      "in": "header",
      "description": "Use `Bearer <tenant API key>`."
    }
  },
  "schemes": [
    "https"
  ],
  "security": [
    {
      "BearerAuth": []
    }
  ]
}
