{
  "openapi": "3.0.4",
  "info": {
    "title": "Orders API",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.mercadoe.com"
    }
  ],
  "paths": {
    "/v1/orders/{orderId}/deliveries": {
      "post": {
        "tags": [
          "Deliveries"
        ],
        "summary": "Create an order delivery",
        "description": "Create a new order delivery after the creation of a purchase order. The delivery can be partially by informing `false` in the `closed` field.",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "description": "the order id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "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"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Deliveries"
        ],
        "summary": "Get the deliveries based on its orderId",
        "description": "Get information about the deliveries by informing the `orderId`.",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "description": "the order id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAllResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders/{orderId}/deliveries/{deliveryId}": {
      "get": {
        "tags": [
          "Deliveries"
        ],
        "summary": "Get an delivery based on the order Id and delivery Id.",
        "description": "Get information about a specific purchase delivery with the given orderId and deliveryId.",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "description": "the order id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "deliveryId",
            "in": "path",
            "description": "the delivery id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetByIdResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders/{orderId}/attachments": {
      "get": {
        "tags": [
          "Orders"
        ],
        "summary": "Get the attachment IDs linked to an order",
        "description": "Retrieves the attachment IDs for a specific order using the given order ID.",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "description": "The page number must be an integer greater than or equal to 1. Default is 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. Default is 10.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAttachmentsResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      },
      "post": {
        "tags": [
          "Orders"
        ],
        "summary": "Add an attachment to the order",
        "description": "Add a new attachment to a specific order by providing the order ID and the attachment file.",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "description": "The order id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "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": {
                  "OrderId": {
                    "type": "integer",
                    "description": "ME Order Id",
                    "format": "int32"
                  },
                  "ItemId": {
                    "type": "integer",
                    "description": "Order item",
                    "format": "int32"
                  },
                  "File": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "OrderId": {
                  "style": "form"
                },
                "ItemId": {
                  "style": "form"
                },
                "File": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AddAttachmentResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders/{orderId}/items/{itemId}/attachments": {
      "get": {
        "tags": [
          "Orders"
        ],
        "summary": "Get the attachment IDs linked to an order item",
        "description": "Retrieves the attachment IDs associated with a specific order item, identified by the given order ID and order item ID.",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "description": "The order id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "itemId",
            "in": "path",
            "description": "The order item id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "description": "The page number must be an integer greater than or equal to 1. Default is 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. Default is 10.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAttachmentsResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/v1/orders": {
      "post": {
        "tags": [
          "Orders"
        ],
        "summary": "Create an order",
        "description": "Create a new purchase order by providing the payment condition, items, supplier, delivery place, 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"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Orders"
        ],
        "summary": "Get all orders by query parameters",
        "description": "Returns a list of all orders available to the connected user, filtered according to the specified query parameters.",
        "parameters": [
          {
            "name": "clientOrderId",
            "in": "query",
            "description": "the client order id",
            "schema": {
              "type": "string"
            }
          },
          {
            "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": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetManyResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders/{orderId}": {
      "get": {
        "tags": [
          "Orders"
        ],
        "summary": "Get an order based on the order Id.",
        "description": "Get information about a specific purchase order with the given orderId.",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "description": "the order id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetByIdResponse2"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Orders"
        ],
        "summary": "Update an order based on the order Id",
        "description": "Change fields of a specific purchase order with provided values.",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "description": "the order id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "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/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"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders/{orderId}/attributes": {
      "get": {
        "tags": [
          "Orders"
        ],
        "summary": "Get the order attributes based on the order Id.",
        "description": "Get information about the attributes of a specific purchase order with the given orderId.",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "description": "the order id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAttributesResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders/{orderId}/business-organizations": {
      "get": {
        "tags": [
          "Orders"
        ],
        "summary": "Get the order business organizations based on the order Id.",
        "description": "Get information about the business organizations of a specific purchase order with the given orderId.",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "description": "the order id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetBusinessOrganizationsResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders/{orderId}/attachments/{attachmentId}": {
      "delete": {
        "tags": [
          "Orders"
        ],
        "summary": "Delete an attachment from an order",
        "description": "Deletes an attachment document from a specific order by providing the order ID and the attachment ID.",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "description": "",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "attachmentId",
            "in": "path",
            "description": "",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "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/DeleteAttachmentDocumentResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders/{orderId}/attachments/{attachmentId}/download": {
      "get": {
        "tags": [
          "Orders"
        ],
        "summary": "Redirection link to download the order attachment",
        "description": "This endpoint redirects directly to the client’s order attachment download by entering the orderId, attachmentId, and cancellationToken",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "description": "",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "attachmentId",
            "in": "path",
            "description": "",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders/{orderId}/items": {
      "get": {
        "tags": [
          "Orders"
        ],
        "summary": "Get a list of items based on the order Id",
        "description": "Get a list of all items assigned to a specific purchase order.",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "description": "the order id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "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": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetItemsResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders/{orderId}/items/{itemNumber}/attributes": {
      "get": {
        "tags": [
          "Orders"
        ],
        "summary": "Get the attributes of an item based on the orderId and itemNumber.",
        "description": "Get information about the attributes of a specific item with the given orderId and itemNumber.",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "description": "the order id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "itemNumber",
            "in": "path",
            "description": "the item number",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAttributesResponse2"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders/{orderId}/items/{itemNumber}/deliveries": {
      "get": {
        "tags": [
          "Orders"
        ],
        "summary": "Get a delivery based on its orderId and orderItemId",
        "description": "Get information about a delivery by informing the `orderId` and `orderItemId`.",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "description": "the order id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "itemNumber",
            "in": "path",
            "description": "the order item id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "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": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetDeliveriesResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders/{orderId}/items/{itemNumber}/business-organizations": {
      "get": {
        "tags": [
          "Orders"
        ],
        "summary": "Get the business organizations of an item based on the orderId and itemNumber.",
        "description": "Get information about the business organizations of a specific item with the given orderId and itemNumber.",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "description": "the order id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "itemNumber",
            "in": "path",
            "description": "the item number",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetBusinessOrganizationsResponse2"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders/{orderId}/items/{orderItemId}/attachments/{attachmentId}": {
      "delete": {
        "tags": [
          "Orders"
        ],
        "summary": "Delete an attachment from an order item",
        "description": "Deletes an attachment document from a specific order item by providing the order ID, order item ID, and the attachment ID.",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "description": "",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "orderItemId",
            "in": "path",
            "description": "",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "attachmentId",
            "in": "path",
            "description": "",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "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/DeleteAttachmentDocumentResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders/{orderId}/items/{orderItemId}/attachments/{attachmentId}/download": {
      "get": {
        "tags": [
          "Orders"
        ],
        "summary": "Redirection link to download the order item attachment",
        "description": "This endpoint redirects directly to the client's order item attachment download by entering the orderId, orderItemId, attachmentId, and cancellationToken.",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "description": "",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "orderItemId",
            "in": "path",
            "description": "",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "attachmentId",
            "in": "path",
            "description": "",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders/{orderId}/items/{orderItemId}/attachments": {
      "post": {
        "tags": [
          "Orders"
        ],
        "summary": "Add an attachment to the order item",
        "description": "Add a new attachment to a specific order item by providing the orderId,orderItemId, and attachmentId.",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "description": "The order id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "orderItemId",
            "in": "path",
            "description": "The order item id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "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": {
                  "OrderId": {
                    "type": "integer",
                    "description": "ME Order Id",
                    "format": "int32"
                  },
                  "ItemId": {
                    "type": "integer",
                    "description": "Order item",
                    "format": "int32"
                  },
                  "File": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "OrderId": {
                  "style": "form"
                },
                "ItemId": {
                  "style": "form"
                },
                "File": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AddAttachmentResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders/{orderId}/items/requests/cost-objects": {
      "get": {
        "tags": [
          "Orders"
        ],
        "summary": "Get the entire list of Cost Objects (Request Item x Order Item)",
        "description": "Get a list of all cost objects of all items of the request associated with that order.",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "description": "the order id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "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": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetRequestItemsCostObjectsResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders/supplier-orders/{orderId}/deliveries": {
      "get": {
        "tags": [
          "Supplier Orders"
        ],
        "summary": "Get the order deliveries based on the order Id.",
        "description": "Get information about the deliveries of a specific purchase order with the given orderId.",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "description": "the order id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetDeliveriesResponse2"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders/supplier-orders/{orderId}/deliveries/{deliveryId}": {
      "get": {
        "tags": [
          "Supplier Orders"
        ],
        "summary": "Get an delivery based on the order Id and delivery Id.",
        "description": "Get information about a specific purchase delivery with the given orderId and deliveryId.",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "description": "the order id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "deliveryId",
            "in": "path",
            "description": "the delivery id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetByIdResponse3"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders/supplier-orders/{orderId}": {
      "get": {
        "tags": [
          "Supplier Orders"
        ],
        "summary": "Get an order based on the order Id",
        "description": "Get information about a specific purchase order with the given Id.",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "description": "the order id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetByIdResponse4"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders/supplier-orders": {
      "get": {
        "tags": [
          "Supplier Orders"
        ],
        "summary": "Get orders",
        "description": "Get a list of all purchase orders that are available to the supplier.",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/OrderStatus"
            }
          },
          {
            "name": "orderLimitInDays",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 90
            }
          },
          {
            "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": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MinimalOrderResponseData"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders/supplier-orders/{orderId}/attributes": {
      "get": {
        "tags": [
          "Supplier Orders"
        ],
        "summary": "Get the order attributes based on the order Id.",
        "description": "Get information about the attributes of a specific purchase order with the given orderId.",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "description": "the order id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAttributesResponse3"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders/supplier-orders/{orderId}/business-organizations": {
      "get": {
        "tags": [
          "Supplier Orders"
        ],
        "summary": "Get the order business organizations based on the order Id.",
        "description": "Get information about the business organizations of a specific purchase order with the given orderId.",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "description": "the order id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetBusinessOrganizationsResponse3"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders/supplier-orders/{orderId}/items": {
      "get": {
        "tags": [
          "Supplier Orders"
        ],
        "summary": "Get a list of order items based on the order Id",
        "description": "Get a list of all items assigned to a specific purchase order.",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "description": "the order id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "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": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetItemsResponse2"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders/supplier-orders/{orderId}/items/{itemNumber}/attributes": {
      "get": {
        "tags": [
          "Supplier Orders"
        ],
        "summary": "Get the attributes of an item based on the orderId and itemNumber.",
        "description": "Get information about the attributes of a specific item with the given `orderId` and `itemNumber`.",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "description": "the order id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "itemNumber",
            "in": "path",
            "description": "the item number",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAttributesResponse4"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders/supplier-orders/{orderId}/items/{itemNumber}/deliveries": {
      "get": {
        "tags": [
          "Supplier Orders"
        ],
        "summary": "Get the deliveries of a prorated item based on its orderId and itemNumber",
        "description": "Get information about the deliveries of a prorated item by informing the `orderId` and `itemNumber`.",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "description": "the order id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "itemNumber",
            "in": "path",
            "description": "the  item number",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetDeliveriesResponse3"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders/supplier-orders/{orderId}/items/{itemNumber}/business-organizations": {
      "get": {
        "tags": [
          "Supplier Orders"
        ],
        "summary": "Get the business organizations of an item based on the orderId and itemNumber.",
        "description": "Get information about the business organizations of a specific item with the given `orderId` and `itemNumber`.",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "description": "the order id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "itemNumber",
            "in": "path",
            "description": "the item number",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetBusinessOrganizationsResponse4"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders/supplier-orders/{orderId}/confirm": {
      "patch": {
        "tags": [
          "Supplier Orders - Acceptance and Refusal"
        ],
        "summary": "Confirm an order based on the order Id",
        "description": "The supplier confirms an order by its Id.",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "description": "the order id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "the body of the confirmation request containing the note for confirmation",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmCommand"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Supplier Orders - Acceptance and Refusal"
        ],
        "summary": "Confirm an order based on the order Id",
        "description": "The supplier confirms an order by its Id.",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "description": "the order id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "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": {
          "description": "the body of the confirmation request containing the note for confirmation",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmCommand"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders/supplier-orders/{orderId}/reject": {
      "patch": {
        "tags": [
          "Supplier Orders - Acceptance and Refusal"
        ],
        "summary": "Reject an order based on the order Id and the reason for rejection",
        "description": "The supplier rejects an order by its Id by informing the reason for the rejection.",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "description": "the order id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "the body of the rejection request containing the reason for rejection",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RejectCommand"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Supplier Orders - Acceptance and Refusal"
        ],
        "summary": "Reject an order based on the order Id and the reason for rejection",
        "description": "The supplier rejects an order by its Id by informing the reason for the rejection.",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "description": "the order id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "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": {
          "description": "the body of the rejection request containing the reason for rejection",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RejectCommand"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders/supplier-orders/{orderId}/read": {
      "patch": {
        "tags": [
          "Supplier Orders - Acceptance and Refusal"
        ],
        "summary": "Mark an order as read based on the order ID",
        "description": "The supplier converts the specified purchase order status into read.",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "description": "the order id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Supplier Orders - Acceptance and Refusal"
        ],
        "summary": "Mark an order as read based on the order ID",
        "description": "The supplier converts the specified purchase order status into read.",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "description": "the order id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "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": {
          "204": {
            "description": "No Content"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders/supplier-orders/{orderId}/partial-confirm": {
      "patch": {
        "tags": [
          "Supplier Orders - Acceptance and Refusal"
        ],
        "summary": "Confirm or Reject order items based on the order Id and item Id",
        "description": "The supplier confirms or rejects an order item by the order Id and item Id.",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "description": "the order id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "the body of the approval request containing the list of items and its actions",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrderItemApprovalCommand"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AddAttachmentResponse": {
        "type": "object",
        "properties": {
          "correlationId": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "AddressInfo": {
        "type": "object",
        "properties": {
          "clientPlaceId": {
            "type": "string",
            "description": "Client place code",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Name",
            "nullable": true
          },
          "address": {
            "type": "string",
            "description": "Address",
            "nullable": true
          },
          "number": {
            "type": "string",
            "description": "Number",
            "nullable": true
          },
          "district": {
            "type": "string",
            "description": "District",
            "nullable": true
          },
          "city": {
            "type": "string",
            "description": "City",
            "nullable": true
          },
          "state": {
            "type": "string",
            "description": "State",
            "nullable": true
          },
          "postalCode": {
            "type": "string",
            "description": "Postal code",
            "nullable": true
          },
          "documentNumber": {
            "type": "string",
            "description": "Document Number",
            "nullable": true
          },
          "documentType": {
            "type": "string",
            "description": "Document Type",
            "nullable": true
          },
          "stateRegistration": {
            "type": "string",
            "description": "State Registration",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Attribute": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "minLength": 1,
            "type": "string",
            "description": "It corresponds to a customized field used for integration with the client. It is an internal name that will be referenced for the order attribute."
          },
          "value": {
            "type": "string",
            "description": "It corresponds to a customized field used for integration with the client. The value corresponds to the data entered manually or originated from the integration.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "It corresponds to a customized field used for integration with the client. This field is a label/description that appears on the order's response screen.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "BusinessOrganization": {
        "required": [
          "code",
          "virtualEntityField"
        ],
        "type": "object",
        "properties": {
          "code": {
            "minLength": 1,
            "type": "string",
            "description": "Company code"
          },
          "description": {
            "type": "string",
            "description": "Company description",
            "nullable": true,
            "deprecated": true
          },
          "virtualEntityField": {
            "minLength": 1,
            "type": "string",
            "description": "Delivery center/location code"
          },
          "virtualEntityDescription": {
            "type": "string",
            "description": "Delivery center/location description",
            "nullable": true
          },
          "entityType": {
            "type": "string",
            "description": "Entity type",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CommercialOperation": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Code",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Description",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CompanyNationalRegistration": {
        "type": "object",
        "properties": {
          "stateRegistrationNumber": {
            "type": "string",
            "description": "State registration number of the company"
          },
          "number": {
            "type": "string",
            "description": "National registration number of the company"
          }
        },
        "additionalProperties": false,
        "description": "Represents the company's national and state registration information."
      },
      "ConfirmCommand": {
        "type": "object",
        "properties": {
          "note": {
            "type": "string",
            "description": "Note for the order confirmation.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CreateCommand": {
        "required": [
          "deliveryDate",
          "orderItemId",
          "quantity"
        ],
        "type": "object",
        "properties": {
          "orderItemId": {
            "type": "integer",
            "description": "The order item number for ME.",
            "format": "int32"
          },
          "deliveryDate": {
            "minLength": 1,
            "type": "string",
            "description": "The delivery date for the item.",
            "format": "date-time"
          },
          "quantity": {
            "minimum": 0,
            "type": "number",
            "description": "The quantity of delivered items.\nIn the event of receiving more than was ordered:\ncheck with your administrator or technical support whether your organization allows receiving quantities greater than the ordered amount or reversing more than what was delivered.",
            "format": "double"
          },
          "invoice": {
            "maxLength": 35,
            "type": "string",
            "description": "Invoice",
            "nullable": true
          },
          "invoiceNumber": {
            "maxLength": 30,
            "type": "string",
            "description": "Invoice Number",
            "nullable": true
          },
          "invoiceSerie": {
            "maxLength": 30,
            "type": "string",
            "description": "Invoice Series",
            "nullable": true
          },
          "electronicInvoiceKey": {
            "maxLength": 128,
            "type": "string",
            "description": "Electronic invoice key",
            "nullable": true
          },
          "invoiceItemValue": {
            "type": "number",
            "description": "Invoice item value",
            "format": "double",
            "nullable": true
          },
          "invoiceTotalValue": {
            "minimum": 0,
            "type": "number",
            "description": "Invoice total value",
            "format": "double",
            "nullable": true
          },
          "convertedValueInvoiceItem": {
            "type": "number",
            "description": "Converted value invoice item",
            "format": "double",
            "nullable": true
          },
          "notes": {
            "maxLength": 200,
            "type": "string",
            "description": "Delivery notes",
            "nullable": true
          },
          "clientDocumentId": {
            "maxLength": 40,
            "type": "string",
            "description": "Client document id",
            "nullable": true
          },
          "clientDeliveryId": {
            "maxLength": 20,
            "type": "string",
            "description": "Client delivery id",
            "nullable": true
          },
          "isChargeback": {
            "type": "boolean",
            "description": "It indicates if it is a chargeback (True/False).",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CreateCommand2": {
        "required": [
          "clientSupplierId",
          "integrationTag"
        ],
        "type": "object",
        "properties": {
          "clientOrderId": {
            "maxLength": 20,
            "type": "string",
            "description": "Purchase document identifier."
          },
          "clientSupplierId": {
            "maxLength": 20,
            "minLength": 1,
            "type": "string",
            "description": "Supplier code in the client's ERP"
          },
          "clientPaymentConditionId": {
            "maxLength": 100,
            "type": "string",
            "description": "Client payment condition code",
            "nullable": true
          },
          "incoTerms": {
            "maxLength": 100,
            "type": "string",
            "description": "Freight code (Incoterms)",
            "nullable": true
          },
          "email": {
            "maxLength": 100,
            "type": "string",
            "description": "Buyer's email",
            "nullable": true
          },
          "currency": {
            "maxLength": 20,
            "type": "string",
            "description": "Currency in alphabetic code (for more information, please refer to: https://www.iso.org/iso-4217-currency-codes.html).",
            "nullable": true
          },
          "note": {
            "type": "string",
            "description": "Header note",
            "nullable": true
          },
          "integrationTag": {
            "maxLength": 30,
            "minLength": 1,
            "type": "string",
            "description": "Identification of the ME user used in the integration."
          },
          "isCanceled": {
            "type": "boolean",
            "description": "Is this order canceled? (True/False)\n- Canceled order = \"True\".\n- Active order = \"False\".",
            "nullable": true
          },
          "clientDeliveryPlaceId": {
            "maxLength": 20,
            "type": "string",
            "description": "Client delivery place id",
            "nullable": true
          },
          "clientInvoicingPlaceId": {
            "maxLength": 20,
            "type": "string",
            "description": "Client invoicing place id",
            "nullable": true
          },
          "summary": {
            "maxLength": 500,
            "type": "string",
            "description": "Order title",
            "nullable": true
          },
          "freightValue": {
            "type": "number",
            "description": "Freight value",
            "format": "double",
            "nullable": true
          },
          "isVisibleToSupplier": {
            "type": "boolean",
            "description": "Flag to indicate if the order is visible to the supplier.",
            "nullable": true
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderItemCreate"
            },
            "description": "List of order items."
          },
          "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.",
            "nullable": true
          },
          "attributes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Attribute"
            },
            "description": "List with the attributes of the ordered items, consisting of the name, value and description fields.",
            "nullable": true
          },
          "contractId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "clientContractId": {
            "maxLength": 20,
            "type": "string",
            "nullable": true
          },
          "supplier": {
            "$ref": "#/components/schemas/SupplierInfo"
          },
          "locations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Location"
            },
            "description": "A list of business locations, which contains information such as address, contact details, and more."
          }
        },
        "additionalProperties": false
      },
      "CreateResponse": {
        "type": "object",
        "properties": {
          "correlationId": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "CreateResponse2": {
        "type": "object",
        "properties": {
          "correlationId": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "DeleteAttachmentDocumentResponse": {
        "type": "object",
        "properties": {
          "correlationId": {
            "type": "string",
            "description": ""
          }
        },
        "additionalProperties": false,
        "description": "It is a response to deleting an attachment document."
      },
      "Delivery": {
        "type": "object",
        "properties": {
          "deliveryDate": {
            "type": "string",
            "description": "Delivery date for the item.",
            "format": "date-time"
          },
          "quantity": {
            "type": "number",
            "description": "Quantity of prorated items per delivery.\n(It can be negative in case of chargeback or return.)",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "EActionItemStatusType": {
        "enum": [
          "Accept",
          "Refuse"
        ],
        "type": "string"
      },
      "GetAllResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetDeliveriesResponseData"
            }
          },
          "hits": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "next": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetAttachmentResponseData": {
        "type": "object",
        "properties": {
          "attachmentId": {
            "type": "integer",
            "description": "ID of the attachment linked to an order or order item.",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "GetAttachmentsResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetAttachmentResponseData"
            }
          },
          "hits": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "next": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetAttributesResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetAttributesResponseData"
            }
          },
          "hits": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "next": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetAttributesResponse2": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetAttributesResponseData2"
            }
          },
          "hits": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "next": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetAttributesResponse3": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetAttributesResponseData3"
            }
          },
          "hits": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "next": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetAttributesResponse4": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetAttributesResponseData4"
            }
          },
          "hits": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "next": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetAttributesResponseData": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "It corresponds to a customized field used for integration with the client. It is an internal name that will be referenced for the order attribute."
          },
          "value": {
            "type": "string",
            "description": "It corresponds to a customized field used for integration with the client. The value corresponds to the data entered manually or originated from the integration.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "It corresponds to a customized field used for integration with the client. This field is a label/description that appears on the order's response screen.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetAttributesResponseData2": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "It corresponds to a customized field used for integration with the client. It is an internal name that will be referenced for the order item attribute."
          },
          "value": {
            "type": "string",
            "description": "It corresponds to a customized field used for integration with the client. The value corresponds to the data entered manually or originated from the integration.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "It corresponds to a customized field used for integration with the client. This field is a label/description that appears on the order's response screen.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetAttributesResponseData3": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "It corresponds to a customized field used for integration with the client. It is an internal name that will be referenced for the order attribute."
          },
          "value": {
            "type": "string",
            "description": "It corresponds to a customized field used for integration with the client. The value corresponds to the data entered manually or originated from the integration.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "It corresponds to a customized field used for integration with the client. This field is a label/description that appears on the order's response screen.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetAttributesResponseData4": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "It corresponds to a customized field used for integration with the client. It is an internal name that will be referenced for the order item attribute."
          },
          "value": {
            "type": "string",
            "description": "It corresponds to a customized field used for integration with the client. The value corresponds to the data entered manually or originated from the integration.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "It corresponds to a customized field used for integration with the client. This field is a label/description that appears on the order item's response screen.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetBusinessOrganizationsResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetBusinessOrganizationsResponseData"
            }
          },
          "hits": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "next": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetBusinessOrganizationsResponse2": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetBusinessOrganizationsResponseData2"
            }
          },
          "hits": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "next": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetBusinessOrganizationsResponse3": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetBusinessOrganizationsResponseData3"
            }
          },
          "hits": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "next": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetBusinessOrganizationsResponse4": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetBusinessOrganizationsResponseData4"
            }
          },
          "hits": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "next": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetBusinessOrganizationsResponseData": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Company code",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Company description",
            "nullable": true,
            "deprecated": true
          },
          "virtualEntityField": {
            "type": "string",
            "description": "Delivery center/location code",
            "nullable": true
          },
          "virtualEntityDescription": {
            "type": "string",
            "description": "Delivery center/location description",
            "nullable": true
          },
          "entityType": {
            "type": "string",
            "description": "Entity type",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetBusinessOrganizationsResponseData2": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Company code",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Company description",
            "nullable": true,
            "deprecated": true
          },
          "virtualEntityField": {
            "type": "string",
            "description": "Delivery center/location code",
            "nullable": true
          },
          "virtualEntityDescription": {
            "type": "string",
            "description": "Delivery center/location description",
            "nullable": true
          },
          "entityType": {
            "type": "string",
            "description": "Entity type",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetBusinessOrganizationsResponseData3": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Company code",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Company description",
            "nullable": true,
            "deprecated": true
          },
          "virtualEntityField": {
            "type": "string",
            "description": "Delivery center/location code",
            "nullable": true
          },
          "virtualEntityDescription": {
            "type": "string",
            "description": "Delivery center/location description",
            "nullable": true
          },
          "entityType": {
            "type": "string",
            "description": "Entity type",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetBusinessOrganizationsResponseData4": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Company code",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Company description",
            "nullable": true,
            "deprecated": true
          },
          "virtualEntityField": {
            "type": "string",
            "description": "Delivery center/location code",
            "nullable": true
          },
          "virtualEntityDescription": {
            "type": "string",
            "description": "Delivery center/location description",
            "nullable": true
          },
          "entityType": {
            "type": "string",
            "description": "Entity type",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetByIdResponse": {
        "type": "object",
        "properties": {
          "deliveryId": {
            "type": "integer",
            "description": "Delivery Id",
            "format": "int32"
          },
          "orderId": {
            "type": "integer",
            "description": "ID of the ME purchase order",
            "format": "int32",
            "nullable": true
          },
          "orderItemId": {
            "type": "integer",
            "description": "Item number",
            "format": "int32",
            "nullable": true
          },
          "quantity": {
            "type": "number",
            "description": "Quantity of prorated items per delivery.",
            "format": "double"
          },
          "deliveryDate": {
            "type": "string",
            "description": "The delivery date for the item.",
            "format": "date-time"
          },
          "invoice": {
            "type": "string",
            "description": "Invoice",
            "nullable": true
          },
          "invoiceNumber": {
            "type": "string",
            "description": "Invoice number",
            "nullable": true
          },
          "invoiceSerie": {
            "type": "string",
            "description": "Invoice Series",
            "nullable": true
          },
          "electronicInvoiceKey": {
            "type": "string",
            "description": "Electronic invoice key",
            "nullable": true
          },
          "invoiceItemValue": {
            "type": "number",
            "description": "Invoice item value",
            "format": "double",
            "nullable": true
          },
          "convertedValueInvoiceItem": {
            "type": "number",
            "description": "Converted value invoice item",
            "format": "double",
            "nullable": true
          },
          "notes": {
            "type": "string",
            "description": "Delivery notes",
            "nullable": true
          },
          "clientDocumentId": {
            "type": "string",
            "description": "Client document id",
            "nullable": true
          },
          "clientDeliveryId": {
            "type": "string",
            "description": "Client delivery id",
            "nullable": true
          },
          "isChargeback": {
            "type": "boolean",
            "description": "It indicates if it is a chargeback (True/False).",
            "nullable": true
          },
          "pendingQuantity": {
            "type": "number",
            "description": "The pending quantity",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetByIdResponse2": {
        "type": "object",
        "properties": {
          "orderId": {
            "type": "integer",
            "description": "ID of the ME purchase order",
            "format": "int32"
          },
          "clientOrderId": {
            "type": "string",
            "description": "The order ID in the Client's ERP",
            "nullable": true
          },
          "creationDate": {
            "type": "string",
            "description": "Order creation date",
            "format": "date-time"
          },
          "dateAlteration": {
            "type": "string",
            "description": "It is the date when the order was changed.",
            "format": "date-time",
            "nullable": true
          },
          "quotationId": {
            "type": "integer",
            "description": "Quotation Id",
            "format": "int32",
            "nullable": true
          },
          "deliveryDate": {
            "type": "string",
            "description": "Order delivery date",
            "format": "date-time",
            "nullable": true
          },
          "readingDate": {
            "type": "string",
            "description": "Order reading date",
            "format": "date-time",
            "nullable": true
          },
          "preOrderId": {
            "type": "integer",
            "description": "Pre order Id",
            "format": "int32",
            "nullable": true
          },
          "approvalDate": {
            "type": "string",
            "description": "Order confirmation date",
            "format": "date-time",
            "nullable": true
          },
          "contractId": {
            "type": "integer",
            "description": "Contract Id",
            "format": "int32",
            "nullable": true
          },
          "clientContractId": {
            "type": "string",
            "nullable": true
          },
          "incoTerms": {
            "type": "string",
            "description": "Freight code (IncoTerms)",
            "nullable": true
          },
          "languageId": {
            "type": "integer",
            "description": "Default language selection:\n- 0 = Portuguese (BR)\n- 1 = English\n- 2 = Spanish",
            "format": "int32",
            "nullable": true
          },
          "deliveryDeadline": {
            "type": "integer",
            "description": "Delivery deadline in days",
            "format": "int32",
            "nullable": true
          },
          "invisible": {
            "type": "boolean",
            "description": "It indicates if the order is invisible.",
            "nullable": true
          },
          "freightValue": {
            "type": "number",
            "description": "Freight value",
            "format": "double",
            "nullable": true
          },
          "deliveryPlace": {
            "$ref": "#/components/schemas/AddressInfo"
          },
          "billingPlace": {
            "$ref": "#/components/schemas/AddressInfo"
          },
          "invoicingPlace": {
            "$ref": "#/components/schemas/AddressInfo"
          },
          "name": {
            "type": "string",
            "description": "Buyer's name",
            "nullable": true
          },
          "integrationTag": {
            "type": "string",
            "description": "Identification of the ME user used in the integration",
            "nullable": true
          },
          "clientSupplierId": {
            "type": "string",
            "description": "Supplier code in the client's ERP",
            "nullable": true
          },
          "login": {
            "type": "string",
            "description": "User login",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "description": "Buyer's phone",
            "nullable": true
          },
          "email": {
            "type": "string",
            "description": "Buyer's email",
            "nullable": true
          },
          "contact": {
            "type": "string",
            "description": "Buyer's contact",
            "nullable": true
          },
          "summary": {
            "type": "string",
            "description": "Order title",
            "nullable": true
          },
          "clientPaymentConditionId": {
            "type": "string",
            "description": "Client payment condition code",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "description": "Currency in alphabetic code (for more information, please refer to: https://www.iso.org/iso-4217-currency-codes.html).",
            "nullable": true
          },
          "note": {
            "type": "string",
            "description": "Header note",
            "nullable": true
          },
          "companyName": {
            "type": "string",
            "description": "Company name",
            "nullable": true
          },
          "status": {
            "$ref": "#/components/schemas/OrderStatus"
          },
          "isCanceled": {
            "type": "boolean",
            "description": "Is this order canceled? (True/False)\n- Canceled order = \"True\".\n- Active order = \"False\".",
            "nullable": true
          },
          "isChanged": {
            "type": "boolean",
            "description": "Is this order changed? (True/False)\n- Changed order = \"True\".\n- Not changed order = \"False\".",
            "nullable": true
          },
          "partnerSupplierId": {
            "type": "integer",
            "description": "Partner supplier id",
            "format": "int32",
            "nullable": true
          },
          "clientExchangeRate": {
            "type": "number",
            "description": "Value of the foreign currency exchange rate for the client.",
            "format": "double",
            "nullable": true
          },
          "documentNumber": {
            "type": "string",
            "description": "Document identification number",
            "nullable": true,
            "deprecated": true
          },
          "documentType": {
            "type": "string",
            "description": "Type of document used for national registration in the country. \nEx: CNPJ, IE, etc.",
            "nullable": true,
            "deprecated": true
          },
          "brokerIntegrationTag": {
            "type": "string",
            "description": "Identification of the ME Broker user used in the integration.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetByIdResponse3": {
        "type": "object",
        "properties": {
          "deliveryId": {
            "type": "integer",
            "description": "Delivery Id",
            "format": "int32"
          },
          "orderId": {
            "type": "integer",
            "description": "ID of the ME purchase order",
            "format": "int32",
            "nullable": true
          },
          "orderItemId": {
            "type": "integer",
            "description": "Item number",
            "format": "int32",
            "nullable": true
          },
          "quantity": {
            "type": "number",
            "description": "Quantity of prorated items per delivery.",
            "format": "double"
          },
          "deliveryDate": {
            "type": "string",
            "description": "The delivery date for the item.",
            "format": "date-time"
          },
          "invoice": {
            "type": "string",
            "description": "Invoice",
            "nullable": true
          },
          "invoiceNumber": {
            "type": "string",
            "description": "Invoice number",
            "nullable": true
          },
          "invoiceSerie": {
            "type": "string",
            "description": "Invoice Series",
            "nullable": true
          },
          "electronicInvoiceKey": {
            "type": "string",
            "description": "Electronic invoice key",
            "nullable": true
          },
          "invoiceItemValue": {
            "type": "number",
            "description": "Invoice item value",
            "format": "double",
            "nullable": true
          },
          "convertedValueInvoiceItem": {
            "type": "number",
            "description": "Converted value invoice item",
            "format": "double",
            "nullable": true
          },
          "notes": {
            "type": "string",
            "description": "Delivery notes",
            "nullable": true
          },
          "clientDocumentId": {
            "type": "string",
            "description": "Client document id",
            "nullable": true
          },
          "clientDeliveryId": {
            "type": "string",
            "description": "Client delivery id",
            "nullable": true
          },
          "isChargeback": {
            "type": "boolean",
            "description": "It indicates if it is a chargeback (True/False).",
            "nullable": true
          },
          "pendingQuantity": {
            "type": "number",
            "description": "The pending quantity",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetByIdResponse4": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "ID of the ME order",
            "format": "int32"
          },
          "supplierId": {
            "type": "integer",
            "description": "Supplier ID",
            "format": "int32"
          },
          "clientOrderId": {
            "type": "string",
            "description": "The order ID in the Client's ERP",
            "nullable": true
          },
          "grossValue": {
            "type": "number",
            "description": "Gross value",
            "format": "double",
            "nullable": true
          },
          "netValue": {
            "type": "number",
            "description": "Net value",
            "format": "double",
            "nullable": true
          },
          "creationDate": {
            "type": "string",
            "description": "Order creation date",
            "format": "date-time"
          },
          "dateAlteration": {
            "type": "string",
            "description": "Date when the order was changed.",
            "format": "date-time",
            "nullable": true
          },
          "deliveryDate": {
            "type": "string",
            "description": "Order delivery date",
            "format": "date-time",
            "nullable": true
          },
          "approvalDate": {
            "type": "string",
            "description": "Order confirmation date",
            "format": "date-time",
            "nullable": true
          },
          "quotationId": {
            "type": "integer",
            "description": "Quotation Id",
            "format": "int32",
            "nullable": true
          },
          "contractId": {
            "type": "integer",
            "description": "Contract Id",
            "format": "int32",
            "nullable": true
          },
          "preOrderId": {
            "type": "integer",
            "description": "Pre-order Id",
            "format": "int32",
            "nullable": true
          },
          "languageId": {
            "type": "integer",
            "description": "Default language selection:\n- 0 = Portuguese (BR)\n- 1 = English\n- 2 = Spanish",
            "format": "int32",
            "nullable": true
          },
          "deliveryDeadline": {
            "type": "integer",
            "description": "Delivery deadline in days",
            "format": "int32",
            "nullable": true
          },
          "invisible": {
            "type": "boolean",
            "description": "It indicates if the order is invisible.",
            "nullable": true
          },
          "incoTerms": {
            "type": "string",
            "description": "Freight code (Incoterms)",
            "nullable": true
          },
          "freightValue": {
            "type": "number",
            "description": "Freight value (Incoterms)",
            "format": "double",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Buyer's name",
            "nullable": true
          },
          "integrationTag": {
            "type": "string",
            "description": "Identification of the ME user used in the integration",
            "nullable": true
          },
          "clientSupplierId": {
            "type": "string",
            "description": "Supplier code in the client's ERP",
            "nullable": true
          },
          "login": {
            "type": "string",
            "description": "User login",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "description": "Buyer's phone",
            "nullable": true
          },
          "email": {
            "type": "string",
            "description": "Buyer's email",
            "nullable": true
          },
          "contact": {
            "type": "string",
            "description": "Buyer's contact",
            "nullable": true
          },
          "summary": {
            "type": "string",
            "description": "Order title",
            "nullable": true
          },
          "documentNumber": {
            "type": "string",
            "description": "The Document number of the invoicing place",
            "nullable": true,
            "deprecated": true
          },
          "documentType": {
            "type": "string",
            "description": "Document type of the invoicing place",
            "nullable": true,
            "deprecated": true
          },
          "clientPaymentConditionId": {
            "type": "string",
            "description": "Client payment condition code",
            "nullable": true
          },
          "clientPaymentConditionDescription": {
            "type": "string",
            "description": "Client payment condition description",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "description": "Currency in alphabetic code (for more information, please refer to: https://www.iso.org/iso-4217-currency-codes.html).",
            "nullable": true
          },
          "note": {
            "type": "string",
            "description": "Header note",
            "nullable": true
          },
          "companyName": {
            "type": "string",
            "description": "Company name",
            "nullable": true
          },
          "status": {
            "$ref": "#/components/schemas/OrderStatus"
          },
          "isCanceled": {
            "type": "boolean",
            "description": "Is this order canceled? (True/False)\n- Canceled order = \"True\".\n- Active order = \"False\".",
            "nullable": true
          },
          "readingDate": {
            "type": "string",
            "description": "Order reading date",
            "format": "date-time",
            "nullable": true
          },
          "isChanged": {
            "type": "boolean",
            "description": "Is this order changed? (True/False)\n- Changed order = \"True\".\n- Not changed order = \"False\".",
            "nullable": true
          },
          "commercialOperation": {
            "$ref": "#/components/schemas/CommercialOperation"
          },
          "deliveryPlace": {
            "$ref": "#/components/schemas/AddressInfo"
          },
          "invoicingPlace": {
            "$ref": "#/components/schemas/AddressInfo"
          },
          "billingPlace": {
            "$ref": "#/components/schemas/AddressInfo"
          },
          "taxes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Tax"
            },
            "description": "List with the taxes applied in the country."
          },
          "attributes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Attribute"
            },
            "description": "List with the attributes of the ordered items, consisting of the name, value and description fields.",
            "deprecated": true
          },
          "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.",
            "deprecated": true
          }
        },
        "additionalProperties": false
      },
      "GetDeliveriesResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetDeliveriesResponseData2"
            }
          },
          "hits": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "next": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetDeliveriesResponse2": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetDeliveriesResponseData3"
            }
          },
          "hits": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "next": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetDeliveriesResponse3": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetDeliveriesResponseData4"
            }
          },
          "hits": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "next": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetDeliveriesResponseData": {
        "type": "object",
        "properties": {
          "deliveryId": {
            "type": "integer",
            "description": "DeliveryId",
            "format": "int32"
          },
          "orderId": {
            "type": "integer",
            "description": "Order Id in ME",
            "format": "int32",
            "nullable": true
          },
          "quantity": {
            "type": "number",
            "description": "The quantity of items delivered.\n(It can be negative in case of chargeback or return.)",
            "format": "double",
            "nullable": true
          },
          "deliveryDate": {
            "type": "string",
            "description": "The delivery date for the item.",
            "format": "date-time",
            "nullable": true
          },
          "clientDeliveryId": {
            "type": "string",
            "description": "Client delivery id",
            "nullable": true
          },
          "orderItemId": {
            "type": "integer",
            "description": "The order item number for ME.",
            "format": "int32",
            "nullable": true
          },
          "closed": {
            "type": "boolean",
            "description": "It indicates if it is a final delivery (True/False):\n- If the item is pending delivery = \"False\".\n- If the item has been fully received = \"True\".",
            "nullable": true,
            "deprecated": true
          },
          "idMain": {
            "type": "integer",
            "description": "Main Id",
            "format": "int32",
            "nullable": true,
            "deprecated": true
          },
          "documentNumber": {
            "type": "string",
            "description": "Document number",
            "nullable": true,
            "deprecated": true
          },
          "supplierId": {
            "type": "string",
            "description": "Supplier ID",
            "nullable": true,
            "deprecated": true
          },
          "invoiceNumber": {
            "type": "string",
            "description": "Invoice Number",
            "nullable": true,
            "deprecated": true
          },
          "invoiceSerie": {
            "type": "string",
            "description": "Invoice Serie",
            "nullable": true,
            "deprecated": true
          },
          "chargeback": {
            "type": "boolean",
            "description": "It indicates if it is a chargeback (True/False).",
            "nullable": true,
            "deprecated": true
          },
          "observation": {
            "type": "string",
            "description": "Delivery notes",
            "nullable": true,
            "deprecated": true
          }
        },
        "additionalProperties": false
      },
      "GetDeliveriesResponseData2": {
        "type": "object",
        "properties": {
          "deliveryDate": {
            "type": "string",
            "description": "Delivery date for the item.",
            "format": "date-time"
          },
          "quantity": {
            "type": "number",
            "description": "Quantity of prorated items per delivery.\n(It can be negative in case of chargeback or return.)",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "GetDeliveriesResponseData3": {
        "type": "object",
        "properties": {
          "deliveryId": {
            "type": "integer",
            "description": "DeliveryId",
            "format": "int32"
          },
          "orderId": {
            "type": "integer",
            "description": "Order Id in ME",
            "format": "int32",
            "nullable": true
          },
          "orderItemId": {
            "type": "integer",
            "description": "The order item number for ME.",
            "format": "int32",
            "nullable": true
          },
          "quantity": {
            "type": "number",
            "description": "The quantity of items delivered.\n(It can be negative in case of chargeback or return.)",
            "format": "double",
            "nullable": true
          },
          "deliveryDate": {
            "type": "string",
            "description": "The delivery date for the item.",
            "format": "date-time",
            "nullable": true
          },
          "clientDeliveryId": {
            "type": "string",
            "description": "Client delivery id",
            "nullable": true
          },
          "closed": {
            "type": "boolean",
            "description": "It indicates if it is a final delivery (True/False):\n- If the item is pending delivery = \"False\".\n- If the item has been fully received = \"True\".",
            "nullable": true,
            "deprecated": true
          },
          "idMain": {
            "type": "integer",
            "description": "Main Id",
            "format": "int32",
            "nullable": true,
            "deprecated": true
          },
          "documentNumber": {
            "type": "string",
            "description": "Document number",
            "nullable": true,
            "deprecated": true
          },
          "supplierId": {
            "type": "string",
            "description": "Supplier ID",
            "nullable": true,
            "deprecated": true
          },
          "invoiceNumber": {
            "type": "string",
            "description": "Invoice Number",
            "nullable": true,
            "deprecated": true
          },
          "invoiceSerie": {
            "type": "string",
            "description": "Invoice Serie",
            "nullable": true,
            "deprecated": true
          },
          "chargeback": {
            "type": "boolean",
            "description": "It indicates if it is a chargeback (True/False).",
            "nullable": true,
            "deprecated": true
          },
          "observation": {
            "type": "string",
            "description": "Delivery notes",
            "nullable": true,
            "deprecated": true
          }
        },
        "additionalProperties": false
      },
      "GetDeliveriesResponseData4": {
        "type": "object",
        "properties": {
          "quantity": {
            "type": "number",
            "description": "Quantity of prorated items per delivery.\n(It can be negative in case of chargeback or return.)",
            "format": "double"
          },
          "deliveryDate": {
            "type": "string",
            "description": "Delivery date",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "GetItemsResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetItemsResponseData"
            }
          },
          "hits": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "next": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetItemsResponse2": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetItemsResponseData2"
            }
          },
          "hits": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "next": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetItemsResponseData": {
        "type": "object",
        "properties": {
          "orderId": {
            "type": "integer",
            "description": "OrderId",
            "format": "int32"
          },
          "number": {
            "type": "integer",
            "description": "Item number in the purchase order.",
            "format": "int32"
          },
          "productId": {
            "type": "integer",
            "description": "Product Id",
            "format": "int32",
            "nullable": true
          },
          "quantity": {
            "type": "number",
            "description": "Item quantity in the purchase order.",
            "format": "double",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Small description of the ordered item.",
            "nullable": true
          },
          "complement": {
            "type": "string",
            "description": "Detailed description of the ordered item.",
            "nullable": true
          },
          "measurementUnit": {
            "type": "string",
            "description": "Product unit of measurement.",
            "nullable": true
          },
          "unitPrice": {
            "type": "number",
            "description": "Price per unit",
            "format": "double",
            "nullable": true
          },
          "clientProductId": {
            "type": "string",
            "description": "Product code",
            "nullable": true
          },
          "clientReferenceProductId": {
            "type": "string",
            "description": "Client product code",
            "nullable": true
          },
          "clientGroupId": {
            "type": "string",
            "description": "Product group code",
            "nullable": true
          },
          "clientGroupDescription": {
            "type": "string",
            "description": "Product group description",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "description": "Currency in alphabetic code (for more information, please refer to: https://www.iso.org/iso-4217-currency-codes.html).",
            "nullable": true
          },
          "materialApplication": {
            "type": "string",
            "description": "Material application code",
            "nullable": true
          },
          "materialCategory": {
            "type": "string",
            "description": "Material category",
            "nullable": true
          },
          "note": {
            "type": "string",
            "description": "Item note",
            "nullable": true
          },
          "deliveryDeadline": {
            "type": "string",
            "description": "Delivery deadline",
            "format": "date-time",
            "nullable": true
          },
          "netValue": {
            "type": "number",
            "description": "Net value",
            "format": "double",
            "nullable": true
          },
          "grossValue": {
            "type": "number",
            "description": "Gross value",
            "format": "double",
            "nullable": true
          },
          "isCanceled": {
            "type": "boolean",
            "description": "Is this item canceled? (True/False)\n- Canceled item = \"True\".\n- Active item = \"False\".",
            "nullable": true
          },
          "isService": {
            "type": "boolean",
            "description": "Flag to identify if the item is a service (false by default).",
            "nullable": true
          },
          "isGeneric": {
            "type": "boolean",
            "description": "Product with code = \"False\".\nProduct without code (generic) = \"True\".",
            "nullable": true
          },
          "isClosed": {
            "type": "boolean",
            "description": "It indicates if it is a final delivery:\n- If the item is pending delivery = \"False\".\n- If the item has been fully received = \"True\".",
            "nullable": true
          },
          "permanentAssets": {
            "type": "boolean",
            "description": "This flag indicates if the product is a fixed asset.",
            "nullable": true
          },
          "deliveryPlace": {
            "$ref": "#/components/schemas/AddressInfo"
          },
          "invoicingPlace": {
            "$ref": "#/components/schemas/AddressInfo"
          },
          "productIdentificationCode": {
            "$ref": "#/components/schemas/ProductIdentification"
          },
          "taxInformation": {
            "$ref": "#/components/schemas/TaxInformation"
          },
          "deliveries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Delivery"
            },
            "description": "List with the deliveries of the ordered items, consisting of the quantity and delivery date fields.",
            "nullable": true
          },
          "wasChanged": {
            "type": "boolean",
            "description": "This flag indicates if the order item was changed.",
            "nullable": true
          },
          "vatCode": {
            "type": "string",
            "description": "The item's Value Added Tax (VAT) code, commonly referred to as IVA in some countries, such as Brazil.",
            "nullable": true
          },
          "erpNetUnitPrice": {
            "type": "number",
            "description": "ERP Net Unit Price",
            "format": "double",
            "nullable": true
          },
          "priceConversionFactor": {
            "type": "integer",
            "description": "Price conversion factor that represents the pricing unit scale. \nThis field corresponds to the SAP \"POR\" and defines \nthe number of units to which the net price applies (e.g., price per 1, 100, or 1000 units). \nIt is used to calculate the effective unit price by dividing the net price \nby this factor. This mechanism is essential for low unit-value items, where \npricing per single unit would cause rounding issues when limited to two decimal places.",
            "format": "int32",
            "nullable": true
          },
          "contractItemNumber": {
            "type": "integer",
            "description": "Item number in the contract related to this order item",
            "format": "int32",
            "nullable": true
          },
          "manufacturer": {
            "type": "string",
            "description": "Item manufacturer's name.",
            "nullable": true
          },
          "materialOrigin": {
            "type": "string",
            "description": "Indicates where the material originated.",
            "nullable": true
          },
          "subItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SubItem"
            },
            "description": "A list of sub-items within the order item, containing detailed product and tax information.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetItemsResponseData2": {
        "type": "object",
        "properties": {
          "orderId": {
            "type": "integer",
            "description": "Order Id",
            "format": "int32"
          },
          "number": {
            "type": "integer",
            "description": "Item number in the purchase order.",
            "format": "int32"
          },
          "productId": {
            "type": "integer",
            "description": "Product Id",
            "format": "int32",
            "nullable": true
          },
          "quantity": {
            "type": "number",
            "description": "Item quantity in the purchase order.",
            "format": "double",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Small description of the ordered item.",
            "nullable": true
          },
          "complement": {
            "type": "string",
            "description": "Detailed description of the ordered item.",
            "nullable": true
          },
          "measurementUnit": {
            "type": "string",
            "description": "Product unit of measurement.",
            "nullable": true
          },
          "unitPrice": {
            "type": "number",
            "description": "Price per unit",
            "format": "double",
            "nullable": true
          },
          "clientProductId": {
            "type": "string",
            "description": "Product code",
            "nullable": true
          },
          "clientReferenceProductId": {
            "type": "string",
            "description": "Client product code",
            "nullable": true
          },
          "clientGroupId": {
            "type": "string",
            "description": "Product group code",
            "nullable": true
          },
          "clientGroupDescription": {
            "type": "string",
            "description": "Product group description",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "description": "Currency in alphabetic code (for more information, please refer to: https://www.iso.org/iso-4217-currency-codes.html).",
            "nullable": true
          },
          "materialApplication": {
            "type": "string",
            "description": "Material usage in the ERP.",
            "nullable": true
          },
          "materialCategory": {
            "type": "string",
            "description": "Material category",
            "nullable": true
          },
          "note": {
            "type": "string",
            "description": "Item notes",
            "nullable": true
          },
          "deliveryDeadline": {
            "type": "string",
            "description": "Delivery deadline",
            "format": "date-time",
            "nullable": true
          },
          "netValue": {
            "type": "number",
            "description": "Net value",
            "format": "double",
            "nullable": true
          },
          "grossValue": {
            "type": "number",
            "description": "Gross value",
            "format": "double",
            "nullable": true
          },
          "canceled": {
            "type": "boolean",
            "description": "Is this item canceled? (True/False)\n- Canceled item = \"True\".\n- Active item = \"False\".",
            "nullable": true
          },
          "isService": {
            "type": "boolean",
            "description": "Flag to identify if the item is a service (false by default).",
            "nullable": true
          },
          "isGeneric": {
            "type": "boolean",
            "description": "Item with code = \"False\".\nItem without code (generic) = \"True\".",
            "nullable": true
          },
          "isClosed": {
            "type": "boolean",
            "description": "It indicates if it is a final delivery (True/False):\n- If the item is pending delivery = \"False\".\n- If the item has been fully received = \"True\".",
            "nullable": true
          },
          "permanentAssets": {
            "type": "boolean",
            "description": "This flag indicates if the product is a fixed asset (True/False).",
            "nullable": true
          },
          "deliveryPlace": {
            "$ref": "#/components/schemas/AddressInfo"
          },
          "invoicingPlace": {
            "$ref": "#/components/schemas/AddressInfo"
          },
          "deliveryDate": {
            "type": "string",
            "description": "Delivery date for the item.",
            "format": "date-time",
            "nullable": true
          },
          "productIdentificationCode": {
            "$ref": "#/components/schemas/ProductIdentification"
          },
          "taxes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Tax"
            },
            "description": "List with the taxes applied in the country.",
            "nullable": true
          },
          "deliveries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Delivery"
            },
            "description": "A list of prorated items per delivery.",
            "nullable": true
          },
          "attributes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Attribute"
            },
            "description": "A list with the attributes of the order items, consisting of the name, value and description fields.",
            "nullable": true
          },
          "wasChanged": {
            "type": "boolean",
            "description": "This flag indicates if the order item was changed",
            "nullable": true
          }
        },
        "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": {
          "orderId": {
            "type": "integer",
            "description": "ID of the ME purchase order",
            "format": "int32"
          },
          "clientOrderId": {
            "type": "string",
            "description": "The order ID in the Client's ERP",
            "nullable": true
          },
          "creationDate": {
            "type": "string",
            "description": "Order creation date",
            "format": "date-time"
          },
          "dateAlteration": {
            "type": "string",
            "description": "It is the date when the order was changed.",
            "format": "date-time",
            "nullable": true
          },
          "quotationId": {
            "type": "integer",
            "description": "Quotation Id",
            "format": "int32",
            "nullable": true
          },
          "deliveryDate": {
            "type": "string",
            "description": "Order delivery date",
            "format": "date-time",
            "nullable": true
          },
          "preOrderId": {
            "type": "integer",
            "description": "Pre order Id",
            "format": "int32",
            "nullable": true
          },
          "approvalDate": {
            "type": "string",
            "description": "Order confirmation date",
            "format": "date-time",
            "nullable": true
          },
          "contractId": {
            "type": "integer",
            "description": "Contract Id",
            "format": "int32",
            "nullable": true
          },
          "incoTerms": {
            "type": "string",
            "description": "Freight code (Incoterms)",
            "nullable": true
          },
          "languageId": {
            "type": "integer",
            "description": "Default language selection:\n- 0 = Portuguese (BR)\n- 1 = English\n- 2 = Spanish",
            "format": "int32",
            "nullable": true
          },
          "deliveryDeadline": {
            "type": "integer",
            "description": "Delivery deadline",
            "format": "int32",
            "nullable": true
          },
          "invisible": {
            "type": "boolean",
            "description": "It indicates if the order is invisible.",
            "nullable": true
          },
          "freightValue": {
            "type": "number",
            "description": "Freight value",
            "format": "double",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Buyer's name",
            "nullable": true
          },
          "integrationTag": {
            "type": "string",
            "description": "Identification of the ME user used in the integration.",
            "nullable": true
          },
          "clientSupplierId": {
            "type": "string",
            "description": "Supplier code in the client's ERP.",
            "nullable": true
          },
          "login": {
            "type": "string",
            "description": "User login",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "description": "Buyer's phone",
            "nullable": true
          },
          "email": {
            "type": "string",
            "description": "Buyer's email",
            "nullable": true
          },
          "contact": {
            "type": "string",
            "description": "Buyer's contact",
            "nullable": true
          },
          "summary": {
            "type": "string",
            "description": "Order title",
            "nullable": true
          },
          "documentNumber": {
            "type": "string",
            "description": "Document identification number",
            "nullable": true
          },
          "documentType": {
            "type": "string",
            "description": "Type of document used for national registration in the country. \nEx: CNPJ, IE, etc.",
            "nullable": true
          },
          "clientPaymentConditionId": {
            "type": "string",
            "description": "Client payment condition code",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "description": "Currency in alphabetic code (for more information, please refer to: https://www.iso.org/iso-4217-currency-codes.html).",
            "nullable": true
          },
          "note": {
            "type": "string",
            "description": "Header note",
            "nullable": true
          },
          "companyName": {
            "type": "string",
            "description": "Company name",
            "nullable": true
          },
          "status": {
            "$ref": "#/components/schemas/OrderStatus"
          },
          "isCanceled": {
            "type": "boolean",
            "description": "Is this order canceled? (True/False)\n- Canceled order = \"True\".\n- Active order = \"False\".",
            "nullable": true
          },
          "isChanged": {
            "type": "boolean",
            "description": "Is this order changed? (True/False)\n- Changed order = \"True\".\n- Not changed order = \"False\".",
            "nullable": true
          },
          "deliveryPlace": {
            "$ref": "#/components/schemas/AddressInfo"
          },
          "billingPlace": {
            "$ref": "#/components/schemas/AddressInfo"
          },
          "invoicingPlace": {
            "$ref": "#/components/schemas/AddressInfo"
          },
          "taxes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Tax"
            },
            "description": "List with the taxes applied in the country."
          }
        },
        "additionalProperties": false
      },
      "GetRequestItemsCostObjectsResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetRequestItemsCostObjectsResponseData"
            }
          },
          "hits": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "next": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetRequestItemsCostObjectsResponseData": {
        "type": "object",
        "properties": {
          "orderId": {
            "type": "integer",
            "description": "ID of the ME purchase order",
            "format": "int32"
          },
          "orderItemId": {
            "type": "integer",
            "description": "Order Item Id",
            "format": "int32"
          },
          "requestId": {
            "type": "integer",
            "description": "ME Request Id",
            "format": "int32"
          },
          "requestItemId": {
            "type": "integer",
            "description": "Request Item Id",
            "format": "int32"
          },
          "quantity": {
            "type": "number",
            "description": "Prorated quantity",
            "format": "double",
            "nullable": true
          },
          "clientCostCenterId": {
            "type": "string",
            "description": "Cost center code in the client's ERP",
            "nullable": true
          },
          "ledgerAccountId": {
            "type": "string",
            "description": "Ledger account code",
            "nullable": true
          },
          "clientOrderId": {
            "type": "string",
            "description": "ERP field related to the order.",
            "nullable": true
          },
          "clientCategoryOrder": {
            "type": "string",
            "description": "ERP field related to the order category.",
            "nullable": true
          },
          "wbsElementCode": {
            "type": "string",
            "description": "WBS Element (A WBS element (Work Breakdown Structure element, in Portuguese is called \"Elemento PEP\") is a structured component within a project, used to organize and manage project work in a hierarchical manner.)",
            "nullable": true
          },
          "permanentAsset": {
            "type": "string",
            "description": "It indicates the permanent asset number of the item.",
            "nullable": true
          },
          "subNR": {
            "type": "string",
            "description": "It is the permanent asset sub-number.",
            "nullable": true
          },
          "cfi": {
            "type": "string",
            "description": "It is the number of Indirect Manufacturing Costs (in Portuguese, the acronym CFI stands for \"Custos Indiretos de Fabricação\").",
            "nullable": true
          },
          "os": {
            "type": "string",
            "description": "It is the number of the Service Order.",
            "nullable": true
          },
          "project": {
            "type": "string",
            "description": "It is the number of the Project.",
            "nullable": true
          },
          "networkDiagram": {
            "type": "string",
            "description": "It is the network diagram.",
            "nullable": true
          },
          "department": {
            "type": "string",
            "description": "It indicates the department.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Location": {
        "type": "object",
        "properties": {
          "placeName": {
            "type": "string",
            "description": "Name of the place or location (e.g., \"Main Warehouse\", \"Branch A\")."
          },
          "clientPlaceId": {
            "type": "string",
            "description": "Identifier used by the client system to reference this location."
          },
          "address": {
            "type": "string",
            "description": "Street address of the location."
          },
          "addressNumber": {
            "type": "string",
            "description": "Number of the building or property."
          },
          "city": {
            "type": "string",
            "description": "City where the location is situated."
          },
          "state": {
            "type": "string",
            "description": "State or province of the location."
          },
          "country": {
            "type": "string",
            "description": "Country of the location."
          },
          "postalCode": {
            "type": "string",
            "description": "Postal or ZIP code of the location."
          },
          "neighborhood": {
            "type": "string",
            "description": "Neighborhood or district of the location."
          },
          "complement": {
            "type": "string",
            "description": "Additional address details (e.g., apartment, suite, floor)."
          },
          "contact": {
            "type": "string",
            "description": "Name of the contact person at this location."
          },
          "phoneNumber": {
            "type": "string",
            "description": "Phone number to reach the contact person or the location."
          },
          "locationType": {
            "type": "integer",
            "description": "Type of the location\n1 - Delivery Place\n2 - Invoicing Place\n3 - Billing Place",
            "format": "int32",
            "nullable": true
          },
          "isDeactivated": {
            "type": "boolean",
            "description": "Indicates whether this location is deactivated or blocked for use."
          },
          "directDialingNumber": {
            "type": "string",
            "description": "International direct dialing code (e.g., +55 for Brazil)."
          },
          "businessOrganizations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BusinessOrganization"
            },
            "description": "A list consisting of the Company Code and the Delivery Center/Location Code."
          },
          "companyNationalRegistrationModel": {
            "$ref": "#/components/schemas/CompanyNationalRegistration"
          }
        },
        "additionalProperties": false,
        "description": "Represents a business location, including address, contact, and additional metadata."
      },
      "MinimalOrderResponseData": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "ID of the ME order",
            "format": "int32"
          },
          "clientOrderId": {
            "type": "string",
            "description": "The order ID in the Client's ERP",
            "nullable": true
          },
          "workflowId": {
            "type": "integer",
            "description": "Buyer Workflow ID",
            "format": "int32",
            "nullable": true
          },
          "companyName": {
            "type": "string",
            "description": "Company Name related to Workflow ID",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "OrderCreateTax": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "This field informs the tax name used in the country. The options are:\n\"IVA\"\n\"ICMS\"\n\"IPI\"\n\"PIS\"\n\"COFINS\"\n\"CS\" \n\"IR\"\n\"INSS\"\n\"IBSTaxRate\"\n\"MunicipalIBSTaxRate\"\n\"CBSTaxRate\"\n\"IRRF\"\n\"CIDE\"",
            "nullable": true
          },
          "aliquot": {
            "type": "number",
            "description": "Tax rate",
            "format": "double",
            "nullable": true
          },
          "taxApplication": {
            "type": "string",
            "description": "This field informs if any tax will be applied. The options are:\n\"Free\" = No tax applied.\n\"Included\" = Included in the price.\n\"NotIncluded\" = Not included in the price.\n\"NotInformed\" = No fee was informed.\n\"ZeroRate\" = Zero rate tax.",
            "nullable": true
          },
          "reducedTaxRate": {
            "type": "number",
            "description": "Reduced Tax Rate",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "OrderCreateTaxInformation": {
        "type": "object",
        "properties": {
          "calculationBasis": {
            "type": "number",
            "description": "Calculation Basis (0 to 100 (percentage))",
            "format": "double",
            "nullable": true
          },
          "calculationBasisWithTax": {
            "type": "string",
            "description": "Calculation basis with tax:\n- \"S\" = tax applied.\n- \"N\" = no tax applied.",
            "nullable": true
          },
          "taxableAmount": {
            "type": "number",
            "description": "The taxable amount used as the calculation basis for taxes.\nThis value represents the base upon which tax rates are applied.",
            "format": "double",
            "nullable": true
          },
          "taxes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderCreateTax"
            },
            "description": "List with the taxes applied in the country.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "OrderItemApprovalCommand": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderItemIdReason"
            },
            "description": "List of order items."
          }
        },
        "additionalProperties": false
      },
      "OrderItemCreate": {
        "required": [
          "itemNumber"
        ],
        "type": "object",
        "properties": {
          "itemNumber": {
            "type": "integer",
            "description": "Item number in the purchase order.",
            "format": "int32"
          },
          "quantity": {
            "type": "number",
            "description": "Item quantity in the purchase order.",
            "format": "double",
            "nullable": true
          },
          "unitPrice": {
            "type": "number",
            "description": "Price per unit",
            "format": "double",
            "nullable": true
          },
          "grossValue": {
            "type": "number",
            "description": "Gross value",
            "format": "double",
            "nullable": true
          },
          "netValue": {
            "type": "number",
            "description": "Net value",
            "format": "double",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Small description of the ordered item.",
            "nullable": true
          },
          "complement": {
            "type": "string",
            "description": "Detailed description of the ordered item.",
            "nullable": true
          },
          "note": {
            "type": "string",
            "description": "Item notes",
            "nullable": true
          },
          "measurementUnit": {
            "type": "string",
            "description": "Product unit of measurement.",
            "nullable": true
          },
          "deliveryDeadlineInDays": {
            "type": "integer",
            "description": "Delivery deadline in days",
            "format": "int32",
            "nullable": true
          },
          "clientProductId": {
            "type": "string",
            "description": "Product code",
            "nullable": true
          },
          "materialApplication": {
            "type": "string",
            "description": "Material usage in the ERP.",
            "nullable": true
          },
          "isCanceled": {
            "type": "boolean",
            "description": "Is this item canceled? (True/False)\n- Canceled item = \"True\".\n- Active item = \"False\".",
            "nullable": true
          },
          "isClosed": {
            "type": "boolean",
            "description": "It indicates if it is a final delivery (True/False):\n- If the item is pending delivery = \"False\".\n- If the item has been fully received = \"True\".",
            "nullable": true
          },
          "expectedDate": {
            "type": "string",
            "description": "Expected delivery date for the item.",
            "format": "date-time",
            "nullable": true
          },
          "clientReferenceProductId": {
            "type": "string",
            "description": "Client reference product id",
            "nullable": true
          },
          "taxInformation": {
            "$ref": "#/components/schemas/OrderCreateTaxInformation"
          },
          "deliveries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Delivery"
            },
            "description": "A list of prorated items per delivery.",
            "nullable": true
          },
          "attributes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Attribute"
            },
            "description": "A list with the attributes of the order items, consisting of the name, value and description fields.",
            "nullable": true
          },
          "product": {
            "$ref": "#/components/schemas/ProductInfo"
          },
          "priceConversionFactor": {
            "type": "integer",
            "description": "Price conversion factor that represents the pricing unit scale. \nThis field corresponds to the SAP \"POR\" and defines \nthe number of units to which the net price applies (e.g., price per 1, 100, or 1000 units). \nIt is used to calculate the effective unit price by dividing the net price \nby this factor. This mechanism is essential for low unit-value items, where \npricing per single unit would cause rounding issues when limited to two decimal places.",
            "format": "int32",
            "nullable": true
          },
          "subItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SubItem"
            },
            "description": "A list of sub-items within the order item, containing detailed product and tax information.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "OrderItemIdReason": {
        "type": "object",
        "properties": {
          "itemNumber": {
            "type": "integer",
            "description": "Item number in the purchase order.",
            "format": "int32"
          },
          "action": {
            "$ref": "#/components/schemas/EActionItemStatusType"
          },
          "reason": {
            "type": "string",
            "description": "Description of the reason for rejection.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "OrderStatus": {
        "enum": [
          "Refused",
          "Canceled",
          "Confirmed",
          "WaitingResponse",
          "Unread",
          "ParciallyConfirmed"
        ],
        "type": "string"
      },
      "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": {}
      },
      "ProductIdentification": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "Product type",
            "nullable": true
          },
          "value": {
            "type": "string",
            "description": "Product value",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ProductInfo": {
        "required": [
          "clientProductId",
          "clientReferenceProductId",
          "description",
          "measurementUnit"
        ],
        "type": "object",
        "properties": {
          "clientProductId": {
            "minLength": 1,
            "type": "string",
            "description": "ClientProductId"
          },
          "clientReferenceProductId": {
            "minLength": 1,
            "type": "string",
            "description": "ClientReferenceProductId"
          },
          "description": {
            "minLength": 1,
            "type": "string",
            "description": "Description"
          },
          "measurementUnit": {
            "minLength": 1,
            "type": "string",
            "description": "MeasurementUnit"
          },
          "complement": {
            "type": "string",
            "description": "Complement"
          },
          "isGeneric": {
            "type": "boolean",
            "description": "IsGeneric",
            "nullable": true
          },
          "isService": {
            "type": "boolean",
            "description": "IsService",
            "nullable": true
          },
          "groupCode": {
            "type": "string",
            "description": "Group Code",
            "nullable": true
          },
          "groupDescription": {
            "type": "string",
            "description": "Group Description",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "RejectCommand": {
        "required": [
          "reason"
        ],
        "type": "object",
        "properties": {
          "reason": {
            "$ref": "#/components/schemas/RejectionReason"
          },
          "reasonDescription": {
            "type": "string",
            "description": "Description of the reason for rejection."
          }
        },
        "additionalProperties": false
      },
      "RejectionReason": {
        "enum": [
          "Unknown",
          "OutOfStock",
          "DoesNotWorkWithItem",
          "ItemIsNoLongerProduced",
          "DoesNotMeetTheSpecifiedDeliveryTime",
          "UnableToReplyWithinTheSetResponseTime",
          "DoesNotMeetSpecifiedPaymentCondition",
          "DoesNotMeetTheSpecifiedPaymentDeadline",
          "Other",
          "DoNotAcceptTheConditionOfSupply",
          "DelayedApprovalOfDrawings",
          "InspectionDelay",
          "DelaysInEventsRequiringCustomerAuthorization",
          "DelayDueToStrikeMovement",
          "DelayDueToForceMajeure"
        ],
        "type": "string"
      },
      "SubItem": {
        "type": "object",
        "properties": {
          "subItemNumber": {
            "type": "integer",
            "description": "Sequential number of the subitem in the ME (within the ordem item).",
            "format": "int32"
          },
          "clientProductId": {
            "type": "string",
            "description": "Product code in the client's ERP system.",
            "nullable": true
          },
          "estimatedDeadline": {
            "type": "integer",
            "description": "Estimated delivery deadline in days.",
            "format": "int32",
            "nullable": true
          },
          "manufacturer": {
            "type": "string",
            "description": "Manufacturers of the product.",
            "nullable": true
          },
          "productGroupId": {
            "type": "integer",
            "description": "Product group identifier in ME.",
            "format": "int32",
            "nullable": true
          },
          "isGeneric": {
            "type": "boolean",
            "description": "Indicates if the product is generic. Set this flag as follows:\n- True = Product without a code\n- False = Product with a code",
            "nullable": true
          },
          "applicationType": {
            "type": "string",
            "description": "Material application code.",
            "nullable": true
          },
          "quantity": {
            "type": "number",
            "description": "Quantity of the sub-item.",
            "format": "double"
          },
          "unitPrice": {
            "type": "number",
            "description": "Unit price of the sub-item.",
            "format": "double",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Description of the sub-item.",
            "nullable": true
          },
          "complement": {
            "type": "string",
            "description": "Additional complement information for the sub-item.",
            "nullable": true
          },
          "measurementUnit": {
            "type": "string",
            "description": "Measurement unit for the sub-item (e.g., \"UN\", \"KG\", \"M\").",
            "nullable": true
          },
          "isCanceled": {
            "type": "boolean",
            "description": "Indicates if the sub-item is canceled.",
            "nullable": true
          },
          "taxInformation": {
            "$ref": "#/components/schemas/SubItemTaxInformation"
          },
          "startDate": {
            "type": "string",
            "description": "Start date of the sub-item.",
            "format": "date-time",
            "nullable": true
          },
          "endDate": {
            "type": "string",
            "description": "End date of the sub-item.",
            "format": "date-time",
            "nullable": true
          },
          "vatCode": {
            "type": "string",
            "description": "The item's Value Added Tax (VAT) code, commonly referred to as IVA in some countries, such as Brazil.",
            "nullable": true
          },
          "priceConversionFactor": {
            "type": "integer",
            "description": "Price conversion factor that represents the pricing unit scale.\nThis field corresponds to the SAP \"POR\" and defines\nthe number of units to which the net price applies (e.g., price per 1, 100, or 1000 units).\nIt is used to calculate the effective unit price by dividing the net price\nby this factor. This mechanism is essential for low unit-value items, where\npricing per single unit would cause rounding issues when limited to two decimal places.",
            "format": "int32",
            "nullable": true
          },
          "erpNetUnitPrice": {
            "type": "number",
            "description": "ERP Net Unit Price.",
            "format": "double",
            "nullable": true
          },
          "grossValue": {
            "type": "number",
            "description": "Gross value",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A list of sub-items within the order item, containing detailed product and tax information."
      },
      "SubItemTax": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "This field informs the tax name used in the country. The options are:\n\"ICMS\"\n\"IPI\"\n\"ISS\""
          },
          "taxRate": {
            "type": "number",
            "description": "Value of the tax rate applied to the sub-item.",
            "format": "double",
            "nullable": true
          },
          "taxApplication": {
            "$ref": "#/components/schemas/SubitemTaxApplication"
          }
        },
        "additionalProperties": false,
        "description": "Represents tax information for a sub-item within a order item."
      },
      "SubItemTaxInformation": {
        "type": "object",
        "properties": {
          "taxes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SubItemTax"
            },
            "description": "List of taxes applied to the sub-item."
          }
        },
        "additionalProperties": false,
        "description": "Represents tax information for a sub-item, containing a list of taxes applied to the sub-item."
      },
      "SubitemTaxApplication": {
        "enum": [
          "Free",
          "Included",
          "NotIncluded",
          "NotInformed"
        ],
        "type": "string",
        "description": "This field informs if any tax will be applied. The options are:\n\"Free\" = No tax applied.\n\"Included\" = Included in the price.\n\"NotIncluded\" = Not included in the price.\n\"NotInformed\" = No fee was informed."
      },
      "SupplierDocument": {
        "type": "object",
        "properties": {
          "number": {
            "type": "string",
            "description": "Document identification number",
            "nullable": true
          },
          "type": {
            "type": "string",
            "description": "Type of legal document used in the company national registration. Ex: CNPJ, IE, etc.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SupplierInfo": {
        "required": [
          "clientSupplierId"
        ],
        "type": "object",
        "properties": {
          "clientSupplierId": {
            "minLength": 1,
            "type": "string",
            "description": "Supplier code in the ERP"
          },
          "tradingName": {
            "type": "string",
            "description": "Supplier's trade name",
            "nullable": true
          },
          "companyName": {
            "type": "string",
            "description": "Supplier's company name",
            "nullable": true
          },
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SupplierDocument"
            },
            "description": "Company national registrations",
            "nullable": true
          },
          "address": {
            "type": "string",
            "description": "Supplier address",
            "nullable": true
          },
          "city": {
            "type": "string",
            "description": "Supplier city",
            "nullable": true
          },
          "state": {
            "type": "string",
            "description": "Supplier state",
            "nullable": true
          },
          "country": {
            "type": "string",
            "description": "Supplier country",
            "nullable": true
          },
          "postalCode": {
            "type": "string",
            "description": "Supplier postal code",
            "nullable": true
          },
          "neighborhood": {
            "type": "string",
            "description": "Supplier neighborhood",
            "nullable": true
          },
          "phoneNumber": {
            "type": "string",
            "description": "Supplier phone number",
            "nullable": true
          },
          "paymentCondition": {
            "type": "string",
            "description": "Payment terms and conditions agreed with the supplier",
            "nullable": true
          },
          "contact": {
            "type": "string",
            "description": "Supplier contact name",
            "nullable": true
          },
          "email": {
            "type": "string",
            "description": "Supplier email",
            "nullable": true
          },
          "supplierGroup": {
            "type": "string",
            "description": "Supplier group list delimited by '#' character",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Tax": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Tax name used in the country.",
            "nullable": true
          },
          "aliquot": {
            "type": "number",
            "description": "Tax rate",
            "format": "double",
            "nullable": true
          },
          "isIncluded": {
            "type": "boolean",
            "description": "This field identifies if the tax is included:\n- \"True\" = Included in the price.\n- \"False\" = Not included in the price.",
            "nullable": true,
            "deprecated": true
          },
          "taxApplication": {
            "$ref": "#/components/schemas/TaxApplication"
          },
          "reducedTaxRate": {
            "type": "number",
            "description": "Reduced Tax Rate",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "TaxApplication": {
        "enum": [
          "Free",
          "Included",
          "NotIncluded",
          "NotInformed",
          "ZeroRate"
        ],
        "type": "string",
        "description": "This field informs if any tax will be applied. The options are:"
      },
      "TaxInformation": {
        "type": "object",
        "properties": {
          "calculationBasis": {
            "type": "number",
            "description": "Calculation Basis (0 to 100 (percentage))",
            "format": "double",
            "nullable": true
          },
          "calculationBasisWithTax": {
            "type": "string",
            "description": "Calculation basis with tax:\n- \"S\" = tax applied.\n- \"N\" = no tax applied.",
            "nullable": true
          },
          "taxableAmount": {
            "type": "number",
            "description": "The taxable amount used as the calculation basis for taxes.\nThis value represents the base upon which tax rates are applied.",
            "format": "double",
            "nullable": true
          },
          "taxSubstitutions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaxSubstitution"
            },
            "description": "Substitution in the responsibility of paying taxes (“ST” or “Substitução Tributária“, in Portuguese). \nList with the Type, TaxRate and Value fields."
          },
          "taxes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Tax"
            },
            "description": "List with the Tax name, Tax rate and tax inclusion identifier fields"
          }
        },
        "additionalProperties": false
      },
      "TaxSubstitution": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "Tax substitution type",
            "nullable": true
          },
          "aliquot": {
            "type": "number",
            "description": "Tax rate",
            "format": "double",
            "nullable": true
          },
          "value": {
            "type": "number",
            "description": "Tax substitution value",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UpdateCommand": {
        "type": "object",
        "properties": {
          "deliveryPlace": {
            "type": "integer",
            "description": "Delivery location ID in order header",
            "format": "int32",
            "nullable": true
          },
          "note": {
            "type": "string",
            "description": "Order note",
            "nullable": true
          },
          "paymentCondition": {
            "maxLength": 100,
            "type": "string",
            "description": "Client Payment Condition",
            "nullable": true
          },
          "partnerSupplierId": {
            "type": "integer",
            "description": "Partner Supplier",
            "format": "int32",
            "nullable": true
          },
          "freightValue": {
            "type": "number",
            "description": "Freight value",
            "format": "double",
            "nullable": true
          },
          "incoTerms": {
            "type": "string",
            "description": "Freight code (Incoterms)",
            "nullable": true
          },
          "proposalExpirationDate": {
            "type": "string",
            "description": "Proposal Expiration Date",
            "format": "date-time",
            "nullable": true
          },
          "currencyCode": {
            "maxLength": 20,
            "type": "string",
            "description": "Currency in alphabetic code (for more information, please refer to: https://www.iso.org/iso-4217-currency-codes.html).",
            "nullable": true
          },
          "carrierID": {
            "type": "integer",
            "description": "Carrier ID",
            "format": "int32",
            "nullable": true
          },
          "substituteSupplierID": {
            "type": "integer",
            "description": "Substitute supplier identification",
            "format": "int32",
            "nullable": true
          },
          "carrierSupplierID": {
            "type": "integer",
            "description": "Carrier ID of the Supplier",
            "format": "int32",
            "nullable": true
          },
          "isCanceled": {
            "type": "boolean",
            "description": "Is this order canceled? (True/False)\n- Canceled order = \"True\".\n- Active order = \"False\".",
            "nullable": true
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UpdateOrderItem"
            },
            "description": "List with the order items"
          },
          "contractId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "clientContractId": {
            "maxLength": 20,
            "type": "string",
            "nullable": true
          },
          "clientDeliveryPlaceId": {
            "maxLength": 20,
            "type": "string",
            "description": "Client delivery place id",
            "nullable": true
          },
          "clientInvoicingPlaceId": {
            "type": "string",
            "description": "Identifier of the invoicing location in the client's ERP system.",
            "nullable": true
          },
          "attributes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Attribute"
            },
            "description": "Attributes of the order, consisting of a name, value and a description.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UpdateOrderItem": {
        "type": "object",
        "properties": {
          "itemNumber": {
            "type": "integer",
            "description": "Item number in the purchase order",
            "format": "int32"
          },
          "quantity": {
            "type": "number",
            "description": "Item quantity in the purchase order",
            "format": "double",
            "nullable": true
          },
          "unitPrice": {
            "type": "number",
            "description": "Unit Price",
            "format": "double",
            "nullable": true
          },
          "expectedDate": {
            "type": "string",
            "description": "Expected Date",
            "format": "date-time",
            "nullable": true
          },
          "icms": {
            "type": "number",
            "description": "ICMS",
            "format": "double",
            "nullable": true
          },
          "isICMSIncluded": {
            "type": "string",
            "description": "Is ICMS Included? S = Yes / N = No / I = Exempt",
            "nullable": true
          },
          "ipi": {
            "type": "number",
            "description": "IPI",
            "format": "double",
            "nullable": true
          },
          "isIPIIncluded": {
            "type": "string",
            "description": "Is IPI Included? S = Yes / N = No / I = Exempt",
            "nullable": true
          },
          "deliveryDeadline": {
            "type": "integer",
            "description": "Delivery deadline",
            "format": "int32",
            "nullable": true
          },
          "note": {
            "type": "string",
            "description": "Item Note",
            "nullable": true
          },
          "applicationCode": {
            "type": "string",
            "description": "Application Code",
            "nullable": true
          },
          "ivaCode": {
            "type": "string",
            "description": "IVA Code",
            "nullable": true
          },
          "erpEquivalenceCode": {
            "type": "string",
            "description": "ERP Equivalence Code",
            "nullable": true
          },
          "erpNetValue": {
            "type": "number",
            "description": "ERP Net Value",
            "format": "double",
            "nullable": true
          },
          "taxType": {
            "type": "integer",
            "description": "Tax Type",
            "format": "int32",
            "nullable": true
          },
          "grossValue": {
            "type": "number",
            "description": "Full Price",
            "format": "double",
            "nullable": true
          },
          "icmsIvaBase": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "ipiIvaBase": {
            "type": "number",
            "description": "IPI Iva Base",
            "format": "double",
            "nullable": true
          },
          "productIdentificationCode": {
            "type": "string",
            "description": "Product identification code (NBM/NCM)",
            "nullable": true
          },
          "cofins": {
            "type": "number",
            "description": "COFINS",
            "format": "double",
            "nullable": true
          },
          "pis": {
            "type": "number",
            "description": "PIS",
            "format": "double",
            "nullable": true
          },
          "isCOFINSIncluded": {
            "type": "string",
            "description": "Is COFINS Included? S = Yes / N = No / I = Exempt",
            "nullable": true
          },
          "isPISIncluded": {
            "type": "string",
            "description": "Is PIS Included? S = Yes / N = No / I = Exempt",
            "nullable": true
          },
          "materialOriginID": {
            "type": "integer",
            "description": "Material origin:\n1 = Domestic origin\n2 = Foreign origin",
            "format": "int32",
            "nullable": true
          },
          "accountReasonCode": {
            "type": "string",
            "description": "Account Reason Code",
            "nullable": true
          },
          "measurementUnit": {
            "type": "string",
            "description": "/// Product unit of measurement",
            "nullable": true
          },
          "supplierProductCode": {
            "type": "string",
            "description": "Supplier Product Code",
            "nullable": true
          },
          "isGift": {
            "type": "boolean",
            "description": "Set as true if the item is a gift",
            "nullable": true
          },
          "giftNote": {
            "type": "string",
            "description": "Gift Note",
            "nullable": true
          },
          "ivaTax": {
            "type": "number",
            "description": "IVA Tax",
            "format": "double",
            "nullable": true
          },
          "isIVAIncluded": {
            "type": "string",
            "description": "Is IVA Included? S = Yes / N = No / I = Exempt",
            "nullable": true
          },
          "cide": {
            "type": "number",
            "description": "CIDE",
            "format": "double",
            "nullable": true
          },
          "isCIDEIncluded": {
            "type": "string",
            "description": "Is CIDE Included? S = Yes / N = No / I = Exempt",
            "nullable": true
          },
          "irrf": {
            "type": "number",
            "description": "IRRF",
            "format": "double",
            "nullable": true
          },
          "isIRRFIncluded": {
            "type": "string",
            "description": "Is IRRF Included? S = Yes / N = No / I = Exempt",
            "nullable": true
          },
          "isCanceled": {
            "type": "boolean",
            "description": "Is this item canceled? (True/False)\n- Canceled item = \"True\".\n- Active item = \"False\".",
            "nullable": true
          },
          "ibsTaxRate": {
            "type": "number",
            "description": "IBSTaxRate",
            "format": "double",
            "nullable": true
          },
          "ibsTaxationType": {
            "type": "string",
            "description": "Indicates whether the IBSTaxRate tax is:\n- “S” = Included;\n- “N” = Not Included;\n- “I” = Free (tax exemption);\n- “Z” = Zero Rate.",
            "nullable": true
          },
          "reducedIBS": {
            "type": "number",
            "description": "Reduced IBSUF Tax Rate, when applicable.",
            "format": "double",
            "nullable": true
          },
          "municipalIBSTaxRate": {
            "type": "number",
            "description": "Municipal IBSTaxRate",
            "format": "double",
            "nullable": true
          },
          "reducedMunicipalIBS": {
            "type": "number",
            "description": "Reduced IBSMUN tax rate, when applicable.",
            "format": "double",
            "nullable": true
          },
          "cbsTaxRate": {
            "type": "number",
            "description": "CBSTaxRate",
            "format": "double",
            "nullable": true
          },
          "cbsTaxationType": {
            "type": "string",
            "description": "Indicates whether the CBSTaxRate tax is:\n- “S” = Included;\n- “N” = Not Included;\n- “I” = Free (tax exemption);\n- “Z” = Zero Rate.",
            "nullable": true
          },
          "reducedCBS": {
            "type": "number",
            "description": "Reduced CBSTaxRate, when applicable.",
            "format": "double",
            "nullable": true
          },
          "attributes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Attribute"
            },
            "description": "Attributes of the order item, consisting of a name, value and a description.",
            "nullable": true
          },
          "deliveries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Delivery"
            },
            "description": "A list of prorated items per delivery.",
            "nullable": true
          },
          "priceConversionFactor": {
            "type": "integer",
            "description": "Price conversion factor that represents the pricing unit scale. \nThis field corresponds to the SAP \"POR\" and defines \nthe number of units to which the net price applies (e.g., price per 1, 100, or 1000 units). \nIt is used to calculate the effective unit price by dividing the net price \nby this factor. This mechanism is essential for low unit-value items, where \npricing per single unit would cause rounding issues when limited to two decimal places.",
            "format": "int32",
            "nullable": true
          },
          "subItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SubItem"
            },
            "description": "A list of sub-items within the order item, containing detailed product and tax information.",
            "nullable": true
          },
          "iss": {
            "type": "number",
            "description": "ISS",
            "format": "double",
            "nullable": true
          },
          "isISSIncluded": {
            "type": "string",
            "description": "Is ISS Included? S = Yes / N = No / I = Exempt",
            "nullable": true
          }
        },
        "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": []
    }
  ]
}