{
  "openapi": "3.0.1",
  "info": {
    "title": "Bills API",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.mercadoe.com"
    }
  ],
  "paths": {
    "/v1/bills/accounts-payable": {
      "post": {
        "tags": [
          "Accounts Payable"
        ],
        "summary": "Create accounts payable",
        "description": "Create a new account payable by providing the payment condition, document type, due date, and other details.",
        "parameters": [
          {
            "name": "X-ME-CORRELATION-ID",
            "in": "header",
            "description": "Internal client code to be identified in the webhook. It can be, for example, a product code in your ERP, an order number, etc.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCommand"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Accounts Payable"
        ],
        "summary": "Update accounts payable",
        "description": "Update an existing account payable by providing the correlationId, documentNumber, documentReference, and clientSupplierCode.",
        "parameters": [
          {
            "name": "documentNumber",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "documentReference",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "clientSupplierCode",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-ME-CORRELATION-ID",
            "in": "header",
            "description": "Internal client code to be identified in the webhook. It can be, for example, a product code in your ERP, an order number, etc.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCommand"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Accounts Payable"
        ],
        "summary": "Delete accounts payable",
        "description": "Delete an existing account payable by providing the correlationId, documentNumber, documentReference, and clientSupplierCode.",
        "parameters": [
          {
            "name": "documentNumber",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "documentReference",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "clientSupplierCode",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-ME-CORRELATION-ID",
            "in": "header",
            "description": "Internal client code to be identified in the webhook. It can be, for example, a product code in your ERP, an order number, etc.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/bills/accounts-payable/bulk": {
      "delete": {
        "tags": [
          "Accounts Payable"
        ],
        "summary": "Delete all accounts payable",
        "description": "Permanently deletes all existing accounts payable linked to the provided workflow.",
        "parameters": [
          {
            "name": "X-ME-CORRELATION-ID",
            "in": "header",
            "description": "Internal client code to be identified in the webhook. It can be, for example, a product code in your ERP, an order number, etc.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteAllResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Accounts Payable"
        ],
        "summary": "Create accounts payable batch",
        "description": "Create accounts payable through a json file",
        "parameters": [
          {
            "name": "X-ME-CORRELATION-ID",
            "in": "header",
            "description": "Internal client code to be identified in the webhook. It can be, for example, a product code in your ERP, an order number, etc.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "File": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "File": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateBulkResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/bills/accounts-receivable": {
      "post": {
        "tags": [
          "Accounts Receivable"
        ],
        "summary": "Create accounts receivable",
        "description": "Create a new accounts receivable by providing the payment condition, document type, due date, receipt date, and other details.",
        "parameters": [
          {
            "name": "X-ME-CORRELATION-ID",
            "in": "header",
            "description": "Internal client code to be identified in the webhook. It can be, for example, a product code in your ERP, an order number, etc.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCommand2"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateResponse2"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Accounts Receivable"
        ],
        "summary": "Delete accounts receivable",
        "description": "Delete an existing account receivable by providing the correlationId, documentNumber, documentReference, and clientSupplierCode.",
        "parameters": [
          {
            "name": "documentNumber",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "documentReference",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "clientSupplierCode",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-ME-CORRELATION-ID",
            "in": "header",
            "description": "Internal client code to be identified in the webhook. It can be, for example, a product code in your ERP, an order number, etc.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteResponse2"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Accounts Receivable"
        ],
        "summary": "Update accounts receivable",
        "description": "Update an existing account receivable by providing the correlationId, documentNumber, documentReference, and clientSupplierCode.",
        "parameters": [
          {
            "name": "documentNumber",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "documentReference",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "clientSupplierCode",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-ME-CORRELATION-ID",
            "in": "header",
            "description": "Internal client code to be identified in the webhook. It can be, for example, a product code in your ERP, an order number, etc.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCommand2"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Accounts Receivable"
        ],
        "summary": "Get receivables",
        "description": "Retrieves a list of all available accounts receivable documents (invoices, credit notes, etc.) for the connected user.",
        "parameters": [
          {
            "name": "pageNumber",
            "in": "query",
            "description": "the page number must be an integer greater than or equal to 1",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "the page size must be an integer greater than or equal to 1",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetManyResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/bills/accounts-receivable/{accountsreceivableId}": {
      "get": {
        "tags": [
          "Accounts Receivable"
        ],
        "summary": "Get a receivable by ID",
        "description": "Returns the details of an existing accounts receivable document (invoice or credit note, for example) with the given ID",
        "parameters": [
          {
            "name": "accountsreceivableId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAccountReceivableByIdResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "BusinessOrganization": {
        "required": [
          "code",
          "virtualEntityField"
        ],
        "type": "object",
        "properties": {
          "code": {
            "minLength": 1,
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "virtualEntityField": {
            "minLength": 1,
            "type": "string"
          },
          "virtualEntityDescription": {
            "type": "string",
            "nullable": true
          },
          "entityType": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CreateBulkResponse": {
        "type": "object",
        "properties": {
          "correlationId": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "CreateCommand": {
        "required": [
          "clientSupplierCode",
          "documentNumber",
          "documentReference",
          "documentType"
        ],
        "type": "object",
        "properties": {
          "price": {
            "type": "number",
            "description": "Amount payable",
            "format": "double"
          },
          "documentNumber": {
            "minLength": 1,
            "type": "string",
            "description": "Invoice number"
          },
          "clientSupplierCode": {
            "minLength": 1,
            "type": "string",
            "description": "Supplier code"
          },
          "documentType": {
            "minLength": 1,
            "type": "string",
            "description": "Document type"
          },
          "documentReference": {
            "minLength": 1,
            "type": "string",
            "description": "Document number in the ERP"
          },
          "paymentCondition": {
            "type": "string",
            "description": "Payment condition"
          },
          "clientObservation": {
            "type": "string",
            "description": "Client notes",
            "nullable": true
          },
          "documentDate": {
            "type": "string",
            "description": "Document date",
            "format": "date-time"
          },
          "deliveryPlace": {
            "type": "string",
            "description": "Delivery place",
            "nullable": true
          },
          "clientOrderId": {
            "type": "string",
            "description": "Client order number"
          },
          "dueDate": {
            "type": "string",
            "description": "Due date",
            "format": "date-time"
          },
          "isConfirmed": {
            "type": "boolean",
            "description": "Flag to indicate the payment confirmation (True/False)."
          },
          "receiptDate": {
            "type": "string",
            "description": "Receipt date",
            "format": "date-time"
          },
          "expectedDate": {
            "type": "string",
            "description": "Expected date",
            "format": "date-time"
          },
          "clientAccountingDocument": {
            "type": "string",
            "description": "Accounting document number"
          },
          "paymentType": {
            "type": "string",
            "description": "Payment type"
          },
          "deductions": {
            "type": "number",
            "description": "Deductions",
            "format": "double"
          },
          "anticipationStatus": {
            "type": "string",
            "description": "Anticipation status",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Status",
            "nullable": true
          },
          "paymentAmount": {
            "type": "number",
            "description": "Payment amount",
            "format": "double"
          },
          "anticipationDate": {
            "type": "string",
            "description": "Anticipation date",
            "format": "date-time",
            "nullable": true
          },
          "anticipationTax": {
            "type": "number",
            "description": "Anticipation tax",
            "format": "double",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "description": "Currency in alphabetic code.\r\nFor more information, please refer to: https://www.iso.org/iso-4217-currency-codes.html.",
            "nullable": true
          },
          "bank": {
            "type": "string",
            "description": "Bank",
            "nullable": true
          },
          "anticipatedValue": {
            "type": "number",
            "description": "Anticipated value",
            "format": "double",
            "nullable": true
          },
          "account": {
            "type": "string",
            "description": "Bank account",
            "nullable": true
          },
          "agency": {
            "type": "string",
            "description": "Bank branch",
            "nullable": true
          },
          "businessOrganizations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BusinessOrganization"
            },
            "description": "List with the business organizations, consisting of the following fields: code, description, virtualEntityField (delivery center code), virtualEntityDescription (delivery center description), and entityType.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CreateCommand2": {
        "required": [
          "clientSupplierCode",
          "compensationDate",
          "documentDate",
          "documentNumber",
          "documentReference",
          "documentType",
          "value"
        ],
        "type": "object",
        "properties": {
          "paymentType": {
            "type": "string",
            "description": "Payment type"
          },
          "deductions": {
            "type": "number",
            "description": "Deductions",
            "format": "float"
          },
          "currency": {
            "type": "string",
            "description": "Currency in alphabetic code.\r\nFor more information, please refer to: https://www.iso.org/iso-4217-currency-codes.html."
          },
          "clientSupplierCode": {
            "minLength": 1,
            "type": "string",
            "description": "Supplier code"
          },
          "documentNumber": {
            "minLength": 1,
            "type": "string",
            "description": "Invoice number"
          },
          "documentReference": {
            "minLength": 1,
            "type": "string",
            "description": "Document number in the ERP"
          },
          "dueDate": {
            "type": "string",
            "description": "Due date",
            "format": "date-time"
          },
          "compensationDate": {
            "type": "string",
            "description": "Payment date (Clearing date)",
            "format": "date-time"
          },
          "documentDate": {
            "type": "string",
            "description": "Document issue date",
            "format": "date-time"
          },
          "receiptDate": {
            "type": "string",
            "description": "Receipt date",
            "format": "date-time"
          },
          "paymentCondition": {
            "type": "string",
            "description": "Payment condition description"
          },
          "documentType": {
            "minLength": 1,
            "type": "string",
            "description": "Document type"
          },
          "value": {
            "type": "number",
            "description": "Total amount of the account payable",
            "format": "float"
          },
          "totalNetAmount": {
            "type": "number",
            "description": "Total net amount",
            "format": "float"
          },
          "totalGrossAmount": {
            "type": "number",
            "description": "Total gross amount (Invoice total value)",
            "format": "float"
          },
          "paymentAmount": {
            "type": "number",
            "description": "Payment amount",
            "format": "float",
            "nullable": true
          },
          "orderId": {
            "type": "integer",
            "description": "Order Id",
            "format": "int32",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Status"
          },
          "totalTaxAmount": {
            "type": "number",
            "description": "Total tax amount",
            "format": "double",
            "nullable": true
          },
          "clientObservation": {
            "type": "string",
            "description": "Client notes"
          },
          "clientOrderId": {
            "type": "string",
            "description": "Client order number"
          },
          "businessOrganizations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BusinessOrganization"
            },
            "description": "List with the business organizations, consisting of the following fields: code, description, virtualEntityField (delivery center code), virtualEntityDescription (delivery center description), and entityType."
          }
        },
        "additionalProperties": false
      },
      "CreateResponse": {
        "type": "object",
        "properties": {
          "correlationId": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "CreateResponse2": {
        "type": "object",
        "properties": {
          "correlationId": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "DeleteAllResponse": {
        "type": "object",
        "properties": {
          "correlationId": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "DeleteResponse": {
        "type": "object",
        "properties": {
          "correlationId": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "DeleteResponse2": {
        "type": "object",
        "properties": {
          "correlationId": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "GetAccountReceivableByIdResponse": {
        "type": "object",
        "properties": {
          "paymentType": {
            "type": "string",
            "description": "Payment type"
          },
          "deductions": {
            "type": "number",
            "description": "Deductions subtracted from the total amount.",
            "format": "double",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "description": "Currency in alphabetic code.\r\nFor more information, please refer to: https://www.iso.org/iso-4217-currency-codes.html."
          },
          "supplierId": {
            "type": "integer",
            "description": "ME Supplier Id.",
            "format": "int32"
          },
          "documentNumber": {
            "type": "string",
            "description": "Invoice number"
          },
          "documentReference": {
            "type": "string",
            "description": "Document number in the ERP"
          },
          "dueDate": {
            "type": "string",
            "description": "Invoice due date",
            "format": "date-time",
            "nullable": true
          },
          "compensationDate": {
            "type": "string",
            "description": "Payment date (Clearing date)",
            "format": "date-time",
            "nullable": true
          },
          "documentDate": {
            "type": "string",
            "description": "Document issue date",
            "format": "date-time",
            "nullable": true
          },
          "receiptDate": {
            "type": "string",
            "description": "Receipt date",
            "format": "date-time",
            "nullable": true
          },
          "paymentCondition": {
            "type": "string",
            "description": "Payment condition description"
          },
          "documentType": {
            "type": "string",
            "description": "Document type"
          },
          "value": {
            "type": "number",
            "description": "Total amount payable",
            "format": "double",
            "nullable": true
          },
          "totalNetAmount": {
            "type": "number",
            "description": "Total net amount",
            "format": "double",
            "nullable": true
          },
          "totalGrossAmount": {
            "type": "number",
            "description": "Total gross amount (Invoice total value)",
            "format": "double",
            "nullable": true
          },
          "paymentAmount": {
            "type": "number",
            "description": "Payment amount",
            "format": "double",
            "nullable": true
          },
          "orderId": {
            "type": "integer",
            "description": "ME Order Id",
            "format": "int32",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Payment status"
          },
          "totalTaxAmount": {
            "type": "number",
            "description": "Total tax amount",
            "format": "double",
            "nullable": true
          },
          "clientObservation": {
            "type": "string",
            "description": "Client notes"
          },
          "clientOrderId": {
            "type": "string",
            "description": "Order ID in the Client's ERP"
          },
          "businessOrganizations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BusinessOrganization"
            },
            "description": "Business Organizations is a list consisting of the Company Code and the Delivery Center/Location Code."
          }
        },
        "additionalProperties": false
      },
      "GetManyResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetManyResponseData"
            }
          },
          "hits": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "next": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetManyResponseData": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "ID of the ME accounts receivable",
            "format": "int64"
          },
          "supplierId": {
            "type": "integer",
            "description": "ME Supplier Id.",
            "format": "int32"
          },
          "documentNumber": {
            "type": "string",
            "description": "Invoice number"
          },
          "documentReference": {
            "type": "string",
            "description": "Document number in the ERP"
          }
        },
        "additionalProperties": false
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": {}
      },
      "UpdateCommand": {
        "type": "object",
        "properties": {
          "price": {
            "type": "number",
            "description": "Amount payable",
            "format": "double"
          },
          "deliveryPlace": {
            "type": "string",
            "description": "Delivery place",
            "nullable": true
          },
          "documentType": {
            "type": "string",
            "description": "Document type"
          },
          "clientOrderId": {
            "type": "string",
            "description": "Client order Id"
          },
          "clientObservation": {
            "type": "string",
            "description": "Client notes",
            "nullable": true
          },
          "paymentCondition": {
            "type": "string",
            "description": "Payment condition"
          },
          "dueDate": {
            "type": "string",
            "description": "Due date",
            "format": "date-time"
          },
          "receiptDate": {
            "type": "string",
            "description": "Receipt date",
            "format": "date-time"
          },
          "anticipationDate": {
            "type": "string",
            "description": "Anticipation date",
            "format": "date-time",
            "nullable": true
          },
          "clientAccountingDocument": {
            "type": "string",
            "description": "Accounting document number"
          },
          "deductions": {
            "type": "number",
            "description": "Deductions",
            "format": "double"
          },
          "expectedDate": {
            "type": "string",
            "description": "Expected date",
            "format": "date-time"
          },
          "isConfirmed": {
            "type": "boolean",
            "description": "Flag to indicate the payment confirmation (True/False)."
          },
          "paymentType": {
            "type": "string",
            "description": "Payment type"
          },
          "paymentAmount": {
            "type": "number",
            "description": "Payment amount",
            "format": "double"
          },
          "status": {
            "type": "string",
            "description": "Status",
            "nullable": true
          },
          "anticipationStatus": {
            "type": "string",
            "description": "Anticipation status",
            "nullable": true
          },
          "anticipationTax": {
            "type": "number",
            "description": "Anticipation tax",
            "format": "double",
            "nullable": true
          },
          "anticipatedValue": {
            "type": "number",
            "description": "Anticipated value",
            "format": "double",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "description": "Currency in alphabetic code.\r\nFor more information, please refer to: https://www.iso.org/iso-4217-currency-codes.html.",
            "nullable": true
          },
          "agency": {
            "type": "string",
            "description": "Bank branch",
            "nullable": true
          },
          "account": {
            "type": "string",
            "description": "Bank account",
            "nullable": true
          },
          "bank": {
            "type": "string",
            "description": "Bank",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UpdateCommand2": {
        "type": "object",
        "properties": {
          "dueDate": {
            "type": "string",
            "description": "Due date",
            "format": "date-time",
            "nullable": true
          },
          "compensationDate": {
            "type": "string",
            "description": "Payment date (Clearing date)",
            "format": "date-time",
            "nullable": true
          },
          "documentDate": {
            "type": "string",
            "description": "Document issue date",
            "format": "date-time",
            "nullable": true
          },
          "receiptDate": {
            "type": "string",
            "description": "Receipt date",
            "format": "date-time",
            "nullable": true
          },
          "paymentCondition": {
            "type": "string",
            "description": "Payment condition description"
          },
          "documentType": {
            "type": "string",
            "description": "Document type"
          },
          "paymentType": {
            "type": "string",
            "description": "Payment type"
          },
          "deductions": {
            "type": "number",
            "description": "Deductions",
            "format": "float"
          },
          "currency": {
            "type": "string",
            "description": "Currency in alphabetic code.\r\nFor more information, please refer to: https://www.iso.org/iso-4217-currency-codes.html."
          },
          "value": {
            "type": "number",
            "description": "Total amount of the account payable",
            "format": "float"
          },
          "totalNetAmount": {
            "type": "number",
            "description": "Total net amount",
            "format": "float"
          },
          "totalGrossAmount": {
            "type": "number",
            "description": "Total gross amount (Invoice total value)",
            "format": "float"
          },
          "paymentAmount": {
            "type": "number",
            "description": "Payment amount",
            "format": "float",
            "nullable": true
          },
          "clientObservation": {
            "type": "string",
            "description": "Client notes"
          },
          "clientOrderId": {
            "type": "string",
            "description": "Client order number"
          },
          "orderId": {
            "type": "integer",
            "description": "Order Id",
            "format": "int32",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Status"
          },
          "totalTaxAmount": {
            "type": "number",
            "description": "Total tax amount",
            "format": "double",
            "nullable": true
          },
          "businessOrganizations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BusinessOrganization"
            },
            "description": "List with the business organizations, consisting of the following fields: code, description, virtualEntityField (delivery center code), virtualEntityDescription (delivery center description), and entityType."
          }
        },
        "additionalProperties": false
      },
      "UpdateResponse": {
        "type": "object",
        "properties": {
          "correlationId": {
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "apiKey",
        "description": "Please enter the word 'Bearer' followed by a space and then your JWT.",
        "name": "Authorization",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "Bearer": []
    }
  ]
}