{
  "openapi": "3.0.4",
  "info": {
    "title": "Pre-Orders Api",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.mercadoe.com"
    }
  ],
  "paths": {
    "/v1/pre-orders/{preOrderId}/items/requests/attributes": {
      "get": {
        "tags": [
          "Associated Processes"
        ],
        "summary": "Get the entire list of Attributes for all items (Request Item x Pre-Order Item)",
        "description": "Get a list of all attributes of all items of the request associated with that pre-order.",
        "parameters": [
          {
            "name": "preOrderId",
            "in": "path",
            "description": "the pre 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/GetRequestItemsAttributesResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/pre-orders/{preOrderId}/items/{preOrderItemId}/requests/attributes": {
      "get": {
        "tags": [
          "Associated Processes"
        ],
        "summary": "Get the entire list of Attributes for a specific item (Request Item x Pre-Order Item)",
        "description": "Get a list of all attributes of the request associated with that pre-order item.",
        "parameters": [
          {
            "name": "preOrderId",
            "in": "path",
            "description": "the pre order id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "preOrderItemId",
            "in": "path",
            "description": "the pre 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": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetRequestItemAttributesResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/pre-orders/{preOrderId}/items/requests/cost-objects": {
      "get": {
        "tags": [
          "Associated Processes"
        ],
        "summary": "Get the entire list of Cost-Objects (Request Item x Pre-Order Item)",
        "description": "Get a list of all cost-objects of all items of the request associated with that pre-order.",
        "parameters": [
          {
            "name": "preOrderId",
            "in": "path",
            "description": "the pre 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/pre-orders/{preOrderId}/items/requests/deliveries": {
      "get": {
        "tags": [
          "Associated Processes"
        ],
        "summary": "Get the entire list of Deliveries (Request Item x Pre-Order Item)",
        "description": "Get a list of all deliveries of all items of the request associated with that pre-order.",
        "parameters": [
          {
            "name": "preOrderId",
            "in": "path",
            "description": "the pre 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/GetRequestItemsDeliveriesResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/pre-orders/{preOrderId}/items/{itemId}/attachments": {
      "get": {
        "tags": [
          "Pre-Order Items"
        ],
        "summary": "Get the attachment ids linked to a pre-order item",
        "description": "Get the attachment ids of a specific pre-order with the given preOrderId.",
        "parameters": [
          {
            "name": "preOrderId",
            "in": "path",
            "description": "The pre-order id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "itemId",
            "in": "path",
            "description": "The pre-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/pre-orders/{preOrderId}/items/{itemId}/attachments/{attachmentId}": {
      "get": {
        "tags": [
          "Pre-Order Items"
        ],
        "summary": "Get information from pre-order item attachment",
        "description": "Retrieves information about a pre-order item attachment with the given preOrderId, itemId and the attachmentId.\nYou can get information about the attachment such as size, date and other details.",
        "parameters": [
          {
            "name": "preOrderId",
            "in": "path",
            "description": "",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "itemId",
            "in": "path",
            "description": "The pre-order item id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "attachmentId",
            "in": "path",
            "description": "",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAttachmentMetadataResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/pre-orders/{preOrderId}/items/{itemId}/attachments/{attachmentId}/download": {
      "get": {
        "tags": [
          "Pre-Order Items"
        ],
        "summary": "Redirection link to download the pre-order item attachment",
        "description": "This endpoint redirects directly to the client's pre-order attachment download by entering the `preOrderId`, `attachmentId`, and `cancellationToken`.\nYou can add more than one attachment, but only one at a time.",
        "parameters": [
          {
            "name": "preOrderId",
            "in": "path",
            "description": "",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "itemId",
            "in": "path",
            "description": "The pre-order item id",
            "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/pre-orders/{preOrderId}/items/attributes": {
      "get": {
        "tags": [
          "Pre-Order Items"
        ],
        "summary": "Get the entire list of item Attributes",
        "description": "Get a list of the pre-order item attributes based on the pre-order Id. The attributes are customized fields used for integration with the client in order to provide some additional information from the client internal system.",
        "parameters": [
          {
            "name": "preOrderId",
            "in": "path",
            "description": "the preOrderId",
            "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/GetItemsAttributesResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/pre-orders/{preOrderId}/items/{itemId}/attributes": {
      "get": {
        "tags": [
          "Pre-Order Items"
        ],
        "summary": "Get the list of Attributes",
        "description": "Get the pre-order attributes for a specific item and based on the pre-order Id. The attributes are customized fields used for integration with the client in order to provide some additional information from the client internal system.",
        "parameters": [
          {
            "name": "preOrderId",
            "in": "path",
            "description": "the preOrderId",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "itemId",
            "in": "path",
            "description": "the preOrderItemId",
            "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/GetItemAttributesResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Pre-Order Items"
        ],
        "summary": "Update pre-order item attributes",
        "description": "Change a specific pre-order item attribute(s) value(s) based on the pre-order and item Ids.",
        "parameters": [
          {
            "name": "preOrderId",
            "in": "path",
            "description": "The pre-order id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "itemId",
            "in": "path",
            "description": "The pre-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": {
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateItemAttributesCommand"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateItemAttributesResponse"
                }
              }
            }
          },
          "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/pre-orders/{preOrderId}/items": {
      "get": {
        "tags": [
          "Pre-Order Items"
        ],
        "summary": "Get a list of pre-order items based on the pre-order Id",
        "description": "Get a list of all items assigned to a specific pre-order.",
        "parameters": [
          {
            "name": "preOrderId",
            "in": "path",
            "description": "the pre 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/pre-orders/{preOrderId}/items/{itemId}/requests": {
      "get": {
        "tags": [
          "Pre-Order Items"
        ],
        "summary": "Get a list of Requests associated with a specific item",
        "description": "Get a list of all requests assigned to a specific item and based on the pre-order id.",
        "parameters": [
          {
            "name": "preOrderId",
            "in": "path",
            "description": "the preOrderId",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "itemId",
            "in": "path",
            "description": "the preOrderItemId",
            "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/GetRequestsResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/pre-orders/{preOrderId}/approvers": {
      "get": {
        "tags": [
          "Pre-Orders"
        ],
        "summary": "Get Approvers list",
        "description": "Get a list of all pre-orders approvers with the given pre-order Id.",
        "parameters": [
          {
            "name": "preOrderId",
            "in": "path",
            "description": "the preOrderId",
            "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/GetApproversResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/pre-orders/{preOrderId}/attachments": {
      "get": {
        "tags": [
          "Pre-Orders"
        ],
        "summary": "Get the attachment ids linked to a pre-order",
        "description": "Get the attachment ids of a specific pre-order with the given preOrderId.",
        "parameters": [
          {
            "name": "preOrderId",
            "in": "path",
            "description": "The pre-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. 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/pre-orders/{preOrderId}/attachments/{attachmentId}": {
      "get": {
        "tags": [
          "Pre-Orders"
        ],
        "summary": "Get information from pre-order attachment",
        "description": "Retrieves information about a pre-order attachment with the given preOrderId and the attachmentId.\nYou can get information about the attachment such as size, date and other details.",
        "parameters": [
          {
            "name": "preOrderId",
            "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",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAttachmentMetadataResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/pre-orders/{preOrderId}/attachments/{attachmentId}/download": {
      "get": {
        "tags": [
          "Pre-Orders"
        ],
        "summary": "Redirection link to download the pre-order attachment",
        "description": "This endpoint redirects directly to the client's pre-order attachment download by entering the `preOrderId`, `attachmentId`, and `cancellationToken`.\nYou can add more than one attachment, but only one at a time.",
        "parameters": [
          {
            "name": "preOrderId",
            "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/pre-orders/{preOrderId}/attributes": {
      "get": {
        "tags": [
          "Pre-Orders"
        ],
        "summary": "Get header Attributes",
        "description": "Get a list of all pre-order attributes based on the pre-order Id. The attributes are customized fields used for integration with the client in order to provide some additional information from the client internal system.",
        "parameters": [
          {
            "name": "preOrderId",
            "in": "path",
            "description": "the preOrderId",
            "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/GetAttributesResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Pre-Orders"
        ],
        "summary": "Update pre-order attributes based on the pre-order Id",
        "description": "Change a specific pre-order attribute(s) value(s) based on the pre-order Id.",
        "parameters": [
          {
            "name": "preOrderId",
            "in": "path",
            "description": "The pre-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": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAttributesCommand"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateAttributesResponse"
                }
              }
            }
          },
          "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/pre-orders/{preOrderId}/business-organizations": {
      "get": {
        "tags": [
          "Pre-Orders"
        ],
        "summary": "Get Business Organizations",
        "description": "Get a list of all Business Organizations assigned to a specific pre-order.",
        "parameters": [
          {
            "name": "preOrderId",
            "in": "path",
            "description": "the preOrderId",
            "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/GetBusinessOrganizationsResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/pre-orders": {
      "get": {
        "tags": [
          "Pre-Orders"
        ],
        "summary": "Get all pre-orders by query parameters",
        "description": "Returns a list of all purchase pre-orders available to the connected user, filtered according to the specified query parameters.",
        "parameters": [
          {
            "name": "clientPreOrderId",
            "in": "query",
            "description": "the pre order id in the client's ERP",
            "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/GetByIdResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/pre-orders/{id}": {
      "get": {
        "tags": [
          "Pre-Orders"
        ],
        "summary": "Get a pre-order based on the Id",
        "description": "Get information about a specific pre-order with the given Id.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The pre-order 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/pre-orders/{preOrderId}/status": {
      "put": {
        "tags": [
          "Pre-Orders"
        ],
        "summary": "Update a pre-order status based on the pre-order Id",
        "description": "Change a specific pre-order status field with a provided value.",
        "parameters": [
          {
            "name": "preOrderId",
            "in": "path",
            "description": "The pre-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": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateStatusCommand"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateStatusResponse"
                }
              }
            }
          },
          "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/pre-orders/{preOrderItemId}/items/{quotationId}/quotation": {
      "get": {
        "tags": [
          "Pre-Orders"
        ],
        "summary": "Get a list of pre-order items based on the pre-order item Id and quotation id",
        "description": "Get a list of all items assigned to a specific pre-order.",
        "parameters": [
          {
            "name": "preOrderItemId",
            "in": "path",
            "description": "the pre order id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "quotationId",
            "in": "path",
            "description": "the quotation 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/GetPreOrderQuotationItemsByQuotationIdResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AttributeValueDto": {
        "required": [
          "name",
          "value"
        ],
        "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 pre-order attribute."
          },
          "value": {
            "minLength": 1,
            "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."
          }
        },
        "additionalProperties": false
      },
      "GetApproversResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetApproversResponseData"
            }
          },
          "hits": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "next": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetApproversResponseData": {
        "type": "object",
        "properties": {
          "endStatusDescription": {
            "type": "string",
            "description": "Document end status description (Status standard options: SUBMETIDO/SUBMITTED, APROVADO/APPROVED, RECUSADO/REJECTED).",
            "nullable": true
          },
          "initialStatusDescription": {
            "type": "string",
            "description": "Document initial status description (Status standard options: SUBMETIDO/SUBMITTED, APROVADO/APPROVED, RECUSADO/REJECTED).",
            "nullable": true
          },
          "initialStatus": {
            "type": "integer",
            "description": "Document initial status code",
            "format": "int32",
            "nullable": true
          },
          "endStatus": {
            "type": "integer",
            "description": "Document end status code",
            "format": "int32",
            "nullable": true
          },
          "approverId": {
            "type": "integer",
            "description": "Code of the approver user",
            "format": "int32",
            "nullable": true
          },
          "substitutedApproverId": {
            "type": "integer",
            "description": "Id of the substituted approver. \nIf the field is blank it means that there was no substitution.",
            "format": "int32",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Approver's name",
            "nullable": true
          },
          "integrationTag": {
            "type": "string",
            "description": "Identification of the ME user used in the integration.",
            "nullable": true
          },
          "substitutedIntegrationTag": {
            "type": "string",
            "description": "Login of the substituted approver.",
            "nullable": true
          },
          "approvalDate": {
            "type": "string",
            "description": "Approval date",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetAttachmentMetadataResponse": {
        "type": "object",
        "properties": {
          "contentLength": {
            "type": "integer",
            "format": "int64"
          },
          "fileName": {
            "type": "string"
          },
          "contentType": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "GetAttachmentResponseData": {
        "type": "object",
        "properties": {
          "attachmentId": {
            "type": "integer",
            "description": "Representes the ME attachment id",
            "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
      },
      "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 pre-order attribute.",
            "nullable": true
          },
          "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 pre-order'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
      },
      "GetBusinessOrganizationsResponseData": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Company code",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Company description",
            "nullable": true
          },
          "virtualEntityField": {
            "type": "string",
            "description": "Delivery center/location code",
            "nullable": true
          },
          "virtualEntityDescription": {
            "type": "string",
            "description": "Delivery center/location description",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetByIdResponse": {
        "type": "object",
        "properties": {
          "preOrderId": {
            "type": "integer",
            "description": "Pre-Order Id.",
            "format": "int32"
          },
          "category": {
            "type": "string",
            "description": "Type of purchase order to be created in the ERP.",
            "nullable": true
          },
          "integrationTag": {
            "type": "string",
            "description": "Identification of the ME user used in the integration.",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "description": "Status code",
            "format": "int32",
            "nullable": true
          },
          "clientOrderId": {
            "type": "string",
            "description": "ERP Order Number: \n- Filled = it identifies that you should modify an order. \n- Empty = it identifies that you should create an order.",
            "nullable": true
          },
          "clientSupplierId": {
            "type": "string",
            "description": "Supplier code in the ERP.",
            "nullable": true
          },
          "supplierId": {
            "type": "integer",
            "description": "Supplier ID.",
            "format": "int32",
            "nullable": true
          },
          "clientPaymentConditionId": {
            "type": "string",
            "description": "Payment condition code",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "description": "Currency ID (ISO 4217:2015)",
            "nullable": true
          },
          "icoTerms": {
            "type": "string",
            "description": "Freight code (Incoterms)",
            "nullable": true
          },
          "freightValue": {
            "type": "number",
            "description": "Freight value (Incoterms)",
            "format": "double",
            "nullable": true
          },
          "note": {
            "type": "string",
            "description": "Pre-order header note",
            "nullable": true
          },
          "summary": {
            "type": "string",
            "description": "Pre-order title",
            "nullable": true
          },
          "quotationId": {
            "type": "integer",
            "description": "Quotation Id",
            "format": "int32",
            "nullable": true
          },
          "isInvisible": {
            "type": "boolean",
            "description": "It indicates if the pre-order is invisible.",
            "nullable": true
          },
          "automation": {
            "type": "boolean",
            "description": "Flag to indicate if this is an automation created by MEG (ME Automation Genius) - a RPA for Process Automation (Y/N).",
            "nullable": true
          },
          "creationDate": {
            "type": "string",
            "description": "Pre-order creation date",
            "format": "date-time",
            "nullable": true
          },
          "clientDeliveryPlaceId": {
            "type": "string",
            "description": "Header delivery place code.",
            "nullable": true
          },
          "clientInvoicingPlaceId": {
            "type": "string",
            "description": "Header invoicing place code.",
            "nullable": true
          },
          "partnerSupplierId": {
            "type": "integer",
            "description": "Partner supplier.",
            "format": "int32",
            "nullable": true
          },
          "grossValue": {
            "type": "number",
            "description": "Gross value.",
            "format": "double",
            "nullable": true
          },
          "wbsElement": {
            "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
          },
          "clientExchangeRate": {
            "type": "number",
            "description": "Value of the foreign currency exchange rate.",
            "format": "double",
            "nullable": true
          },
          "otherExpenses": {
            "type": "number",
            "description": "Amount referring to other expenses",
            "format": "double",
            "nullable": true
          },
          "clientBillingPlaceId": {
            "type": "string",
            "description": "Header billing place code.",
            "nullable": true
          },
          "orderResponsibleName": {
            "type": "string",
            "description": "Name of the person responsible for the order. For example, a requester or a buyer.",
            "nullable": true
          },
          "contractId": {
            "type": "integer",
            "description": "Contract Id.",
            "format": "int32",
            "nullable": true
          },
          "clientContractId": {
            "type": "string",
            "description": "Contract Code in customer's ERP.",
            "nullable": true
          },
          "serviceSheetHeaderId": {
            "type": "integer",
            "description": "ME Service sheet header Id.",
            "format": "int64",
            "nullable": true
          },
          "carrierDocumentNumber": {
            "type": "string",
            "description": "Carrier's tax document number.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetItemAttributesResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetItemAttributesResponseData"
            }
          },
          "hits": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "next": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetItemAttributesResponseData": {
        "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 pre-order attribute.",
            "nullable": true
          },
          "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 pre-order's response screen.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetItemsAttributesResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetItemsAttributesResponseData"
            }
          },
          "hits": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "next": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetItemsAttributesResponseData": {
        "type": "object",
        "properties": {
          "preOrderItemId": {
            "type": "integer",
            "description": "Pre-order item number",
            "format": "int32"
          },
          "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 pre-order item attribute.",
            "nullable": true
          },
          "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 pre-order's response screen.",
            "nullable": true
          }
        },
        "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
      },
      "GetItemsResponseData": {
        "type": "object",
        "properties": {
          "preOrderId": {
            "type": "integer",
            "description": "Pre-Order Id.",
            "format": "int32",
            "nullable": true
          },
          "itemNumber": {
            "type": "integer",
            "description": "Item number in the purchase pre-order.",
            "format": "int32"
          },
          "grouper": {
            "type": "integer",
            "description": "Grouper",
            "format": "int32",
            "nullable": true
          },
          "quantity": {
            "type": "number",
            "description": "Item quantity in the purchase pre-order.",
            "format": "double",
            "nullable": true
          },
          "unitPrice": {
            "type": "number",
            "description": "Gross price",
            "format": "double",
            "nullable": true
          },
          "netValue": {
            "type": "number",
            "description": "Net price",
            "format": "double",
            "nullable": true
          },
          "priceConversionFactor": {
            "type": "integer",
            "description": "The conversion factor used to calculate the price",
            "format": "int32",
            "nullable": true
          },
          "measurementUnit": {
            "type": "string",
            "description": "Product unit of measurement.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Small description of the pre-ordered item.",
            "nullable": true
          },
          "complement": {
            "type": "string",
            "description": "A detailed description of the pre-ordered item.",
            "nullable": true
          },
          "clientProductId": {
            "type": "string",
            "description": "Product code",
            "nullable": true
          },
          "isCanceled": {
            "type": "boolean",
            "description": "Is this item canceled? (Y/N)\n- N = Active item\n- Y = Canceled item",
            "nullable": true
          },
          "isClosed": {
            "type": "boolean",
            "description": "It indicates if it is a final delivery:\n- \"N\" = if the item is pending delivery.\n- \"Y\" = if the item has been fully received.",
            "nullable": true
          },
          "materialCategory": {
            "type": "string",
            "description": "Material category",
            "nullable": true
          },
          "isGeneric": {
            "type": "boolean",
            "description": "The item is generic if it doesn't have a code:\n- Item without a code = \"Y\".\n- Item with a code = \"N\".",
            "nullable": true
          },
          "clientGroupId": {
            "type": "string",
            "description": "Product group code",
            "nullable": true
          },
          "isService": {
            "type": "boolean",
            "description": "Flag to identify if the item is a service (true/false).\nFalse by default.",
            "nullable": true
          },
          "materialApplication": {
            "type": "string",
            "description": "Material usage in the ERP.",
            "nullable": true
          },
          "note": {
            "type": "string",
            "description": "General item notes",
            "nullable": true
          },
          "purchasingGroup": {
            "type": "string",
            "description": "Purchasing group",
            "nullable": true
          },
          "taxInformation": {
            "$ref": "#/components/schemas/TaxInformation"
          },
          "deliveries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PreOrderItemDelivery"
            },
            "description": "A list of prorated items per delivery.",
            "nullable": true
          },
          "productIdentificationCode": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProductIdentificationCode"
            },
            "description": "List with the product identification code of the request items, consisting of the `type` and `value` fields."
          },
          "supplierNote": {
            "type": "string",
            "description": "General supplier note",
            "nullable": true
          },
          "requestItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RequestItem"
            },
            "description": "A list of request items related to the pre-order item.",
            "nullable": true
          },
          "ivaCode": {
            "type": "string",
            "description": "Iva Code",
            "nullable": true
          },
          "contractItem": {
            "type": "integer",
            "description": "Contract Item",
            "format": "int32",
            "nullable": true
          },
          "materialOrigin": {
            "type": "string",
            "description": "Indicates where the material originated.",
            "nullable": true
          },
          "materialOriginDescription": {
            "type": "string",
            "description": "Indicates where the material originated. Used in tax calculations. 1 = Domestic origin 2 = Foreign origin",
            "nullable": true
          },
          "materialOriginCode": {
            "type": "string",
            "description": "Identifier of the material's origin (e.g., domestic, imported) used in tax calculations.\nPossible values: \n- 1 = Domestic origin \n- 2 = Foreign origin",
            "nullable": true
          },
          "manufacturer": {
            "type": "string",
            "description": "Item manufacturer's name",
            "nullable": true
          },
          "supplierProductCode": {
            "type": "string",
            "description": "Supplier Product Code",
            "nullable": true
          },
          "serviceTaxClassificationCode": {
            "type": "string",
            "description": "Service Tax Classification Code",
            "nullable": true
          },
          "subItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SubItem"
            },
            "description": "List of sub-items related to the pre-order items.",
            "nullable": true
          },
          "exchangeRate": {
            "type": "number",
            "description": "Monetary exchange rate applied for currency conversion.",
            "format": "double",
            "nullable": true
          },
          "convertedCurrencyCode": {
            "type": "string",
            "description": "ISO currency code of the converted (target) currency.",
            "nullable": true
          },
          "convertedUnitPrice": {
            "type": "number",
            "description": "Unit price converted to the currency indicated in ConvertedCurrencyCode.",
            "format": "double",
            "nullable": true
          },
          "selectionJustification": {
            "type": "string",
            "description": "The justification for choosing this item in the pre-order.",
            "nullable": true
          },
          "ledgerAccountCode": {
            "type": "string",
            "description": "Ledger account code associated with the pre-order item.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetPreOrderQuotationItemsByQuotationIdData": {
        "type": "object",
        "properties": {
          "quotationId": {
            "type": "integer",
            "description": "Quotation Id",
            "format": "int32",
            "nullable": true
          },
          "preOrderItem": {
            "type": "integer",
            "description": "Pre-order item number",
            "format": "int32"
          },
          "customerCode": {
            "type": "string",
            "description": "Client order identifier.",
            "nullable": true
          },
          "quotationItemNumber": {
            "type": "integer",
            "description": "Quotation item identifier.",
            "format": "int32",
            "nullable": true
          },
          "quantity": {
            "type": "number",
            "description": "Quantity of the item.",
            "format": "double",
            "nullable": true
          },
          "price": {
            "type": "number",
            "description": "Price of the item.",
            "format": "double",
            "nullable": true
          },
          "measurementUnit": {
            "type": "string",
            "description": "Measurement unit for the item.",
            "nullable": true
          },
          "itemDiscount": {
            "type": "number",
            "description": "Discount applied to the item.",
            "format": "double",
            "nullable": true
          },
          "taxSubstitutionValue": {
            "type": "number",
            "description": "Tax substitutions applicable to the item.",
            "format": "double",
            "nullable": true
          },
          "quotationDiscount": {
            "type": "number",
            "description": "Overall discount applicable to the item.",
            "format": "double",
            "nullable": true
          },
          "expenseDescription": {
            "type": "string",
            "description": "Description of the expenses related to the item.",
            "nullable": true
          },
          "otherExpenses": {
            "type": "number",
            "description": "Other expenses related to the item.",
            "format": "double",
            "nullable": true
          },
          "propertyName": {
            "type": "string",
            "description": "Name of the property associated with the item.",
            "nullable": true
          },
          "propertyValue": {
            "type": "string",
            "description": "Value of the property associated with the item.",
            "nullable": true
          },
          "attributes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PreOrderQuotationAttribute"
            },
            "description": "List with the attributes of the pre-ordered items, including the name and value fields."
          }
        },
        "additionalProperties": false
      },
      "GetPreOrderQuotationItemsByQuotationIdResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetPreOrderQuotationItemsByQuotationIdData"
            }
          },
          "hits": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "next": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetRequestItemAttributesResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetRequestItemAttributesResponseData"
            }
          },
          "hits": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "next": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetRequestItemAttributesResponseData": {
        "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 pre-order attribute.",
            "nullable": true
          },
          "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
          }
        },
        "additionalProperties": false
      },
      "GetRequestItemsAttributesResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetRequestItemsAttributesResponseData"
            }
          },
          "hits": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "next": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetRequestItemsAttributesResponseData": {
        "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 pre-order attribute.",
            "nullable": true
          },
          "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
          },
          "itemId": {
            "type": "integer",
            "description": "Item Id",
            "format": "int32"
          }
        },
        "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": {
          "preOrderId": {
            "type": "integer",
            "description": "Pre-Order Id",
            "format": "int32"
          },
          "preOrderItemId": {
            "type": "integer",
            "description": "Pre-Order Item Id",
            "format": "int32"
          },
          "requestId": {
            "type": "integer",
            "description": "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",
            "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
          },
          "costRate": {
            "type": "number",
            "description": "It indicates the percentage assigned to this Cost Object.",
            "format": "double",
            "nullable": true
          },
          "costAmount": {
            "type": "number",
            "description": "It indicates the monetary value assigned to this Cost Object",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetRequestItemsDeliveriesResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetRequestItemsDeliveriesResponseData"
            }
          },
          "hits": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "next": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetRequestItemsDeliveriesResponseData": {
        "type": "object",
        "properties": {
          "preOrderItemId": {
            "type": "integer",
            "description": "Pre-Order Item Id",
            "format": "int32"
          },
          "deliveryDate": {
            "type": "string",
            "description": "Delivery date",
            "format": "date-time",
            "nullable": true
          },
          "quantity": {
            "type": "number",
            "description": "Quantity of prorated items per delivery.",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetRequestsResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetRequestsResponseData"
            }
          },
          "hits": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "next": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetRequestsResponseData": {
        "type": "object",
        "properties": {
          "request": {
            "type": "integer",
            "description": "Order item request",
            "format": "int32"
          },
          "number": {
            "type": "integer",
            "description": "Request item number",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "ItemTax": {
        "required": [
          "type"
        ],
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "Identification for the tax."
          },
          "taxRate": {
            "type": "number",
            "description": "Tax percentage rate.",
            "format": "double",
            "nullable": true
          },
          "isIncluded": {
            "type": "boolean",
            "description": "Flag to indicate if the tax value is included in the price.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents a single tax entry for a pre-order item."
      },
      "ItemTaxInformation": {
        "type": "object",
        "properties": {
          "calculationBasis": {
            "type": "number",
            "description": "Calcultation basis (0 to 100 (percentage))",
            "format": "double",
            "nullable": true
          },
          "taxes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ItemTax"
            },
            "description": "A list of the taxes applied in the country.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Tax information for a pre-order item."
      },
      "PreOrderItemDelivery": {
        "type": "object",
        "properties": {
          "grouper": {
            "type": "integer",
            "description": "Grouper",
            "format": "int32",
            "nullable": true
          },
          "isCanceled": {
            "type": "boolean",
            "description": "Flag to indicate if this item is canceled (Y/N).",
            "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"
          }
        },
        "additionalProperties": false
      },
      "PreOrderItemStatus": {
        "required": [
          "itemNumber"
        ],
        "type": "object",
        "properties": {
          "itemNumber": {
            "type": "integer",
            "description": "Item number in the purchase pre-order.",
            "format": "int32"
          },
          "unitPrice": {
            "type": "number",
            "description": "Unit price",
            "format": "double",
            "nullable": true
          },
          "netValue": {
            "type": "number",
            "description": "Net price",
            "format": "double",
            "nullable": true
          },
          "erpCorrectedValue": {
            "type": "number",
            "description": "Value corrected by the ERP.",
            "format": "double",
            "nullable": true
          },
          "note": {
            "type": "string",
            "description": "General item notes",
            "nullable": true
          },
          "ivaCode": {
            "type": "string",
            "description": "Iva Code",
            "nullable": true
          },
          "taxInformation": {
            "$ref": "#/components/schemas/ItemTaxInformation"
          },
          "attributes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UpdateStatusAttribute"
            },
            "description": "List of item attributes",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents the status of a pre-order item."
      },
      "PreOrderQuotationAttribute": {
        "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 pre-order attribute.",
            "nullable": true
          },
          "value": {
            "type": "string",
            "description": "It corresponds to a customized field used for integration with the client. This field is a label/description on the pre-order's response screen.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": {}
      },
      "ProductIdentificationCode": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "Type of product identification code (in Brazil the \"Mercosul Common Nomenclature (NCM)\" is used).",
            "nullable": true
          },
          "value": {
            "type": "string",
            "description": "Value of product identification code (in Brazil the \"Mercosul Common Nomenclature (NCM)\" is used).",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "RequestItem": {
        "type": "object",
        "properties": {
          "requestId": {
            "type": "integer",
            "description": "ME request Id",
            "format": "int32"
          },
          "requestItemNumber": {
            "type": "integer",
            "description": "Item number in the purchase request",
            "format": "int32"
          },
          "supplierNote": {
            "type": "string",
            "description": "General supplier note",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SubItem": {
        "type": "object",
        "properties": {
          "subItemNumber": {
            "type": "integer",
            "description": "Sub item number in the purchase pre-order.",
            "format": "int32"
          },
          "quantity": {
            "type": "number",
            "description": "Item quantity in the purchase pre-order.",
            "format": "double",
            "nullable": true
          },
          "unitPrice": {
            "type": "number",
            "description": "Unit price",
            "format": "double",
            "nullable": true
          },
          "grossValue": {
            "type": "number",
            "description": "Gross value",
            "format": "double",
            "nullable": true
          },
          "erpNetUnitPrice": {
            "type": "number",
            "description": "ERP Net Unit UnitPrice",
            "format": "double",
            "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": "Factor for UnitPrice Conversion.",
            "format": "int32",
            "nullable": true
          },
          "startDate": {
            "type": "string",
            "description": "Start date.",
            "format": "date-time",
            "nullable": true
          },
          "endDate": {
            "type": "string",
            "description": "End date.",
            "format": "date-time",
            "nullable": true
          },
          "isCanceled": {
            "type": "boolean",
            "description": "Is this item canceled? (Y/N)\n- N = Active item\n- Y = Canceled item",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Small description of the pre-ordered item.",
            "nullable": true
          },
          "complement": {
            "type": "string",
            "description": "A detailed description of the pre-ordered item.",
            "nullable": true
          },
          "measurementUnit": {
            "type": "string",
            "description": "Product unit of measurement.",
            "nullable": true
          },
          "clientProductId": {
            "type": "string",
            "description": "Product code in the client's ERP system.",
            "nullable": true
          },
          "manufacturer": {
            "type": "string",
            "description": "Product manufacturer.",
            "nullable": true
          },
          "productGroupId": {
            "type": "integer",
            "description": "Product group identifier.",
            "format": "int32",
            "nullable": true
          },
          "estimatedDeadline": {
            "type": "integer",
            "description": "Estimated deadline.",
            "format": "int32",
            "nullable": true
          },
          "isGeneric": {
            "type": "boolean",
            "description": "The Sub item is generic if it doesn't have a code:\n- True = Item without a code.\n- False = Item with a code.",
            "nullable": true
          },
          "applicationType": {
            "type": "string",
            "description": "Material application type.",
            "nullable": true
          },
          "taxInformation": {
            "$ref": "#/components/schemas/SubItemTaxInformation"
          }
        },
        "additionalProperties": false
      },
      "SubItemTax": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "Identification for the tax."
          },
          "taxRate": {
            "type": "number",
            "description": "Value of the tax.",
            "format": "double",
            "nullable": true
          },
          "included": {
            "type": "boolean",
            "description": "Flag to indicate if the tax value is included in the price.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SubItemTaxInformation": {
        "type": "object",
        "properties": {
          "taxes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SubItemTax"
            },
            "description": "List of taxes applied to the sub-item."
          }
        },
        "additionalProperties": false
      },
      "TaxInformation": {
        "type": "object",
        "properties": {
          "calculationBasis": {
            "type": "number",
            "description": "Calcultation basis (0 to 100 (percentage))",
            "format": "double",
            "nullable": true
          },
          "calculationBasisWithTax": {
            "type": "string",
            "description": "Calcultation basis with tax:\n\"S\": for industrialization application.\n\"C\": for other applications.",
            "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
          },
          "taxableAmountIS": {
            "type": "number",
            "description": "The taxable amount used as the calculation basis for the selective tax (IS).\nOnly sent when the workflow parameter \"EnviaCamposReformaTributaria2027\" is set.",
            "format": "double",
            "nullable": true
          },
          "taxableAmountIBSCBSMono": {
            "type": "number",
            "description": "The quantity used as the calculation basis for the monophasic IBS and CBS regime.\nUnlike the other bases this one is a quantity, not a value - it is what the ad rem\nrate multiplies. Shared by the IBS and the CBS, which is why it lives here instead of\ninside one of the tax entries.\nOnly sent when the workflow parameter \"EnviaCamposReformaTributaria2027\" is set.",
            "format": "double",
            "nullable": true
          },
          "taxableAmountISMono": {
            "type": "number",
            "description": "The quantity used as the calculation basis for the monophasic selective tax (IS)\nregime. A quantity, not a value.\nOnly sent when the workflow parameter \"EnviaCamposReformaTributaria2027\" is set.",
            "format": "double",
            "nullable": true
          },
          "taxes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Taxes"
            },
            "description": "A list of the taxes applied in the country."
          },
          "taxSubstitutions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaxSubstitution"
            },
            "description": "A list of the tax substitutions applied in the country.\nDefinition note: Substitution in the responsibility of paying taxes (“ST” or “Substitução Tributária”, in Portuguese)."
          }
        },
        "additionalProperties": false,
        "description": "Tax information"
      },
      "TaxSubstitution": {
        "required": [
          "type"
        ],
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "Tax substitution type"
          },
          "aliquot": {
            "type": "number",
            "description": "Tax rate",
            "format": "double",
            "nullable": true
          },
          "value": {
            "type": "number",
            "description": "Tax substitution value",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Taxes": {
        "required": [
          "type"
        ],
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "Identification for the tax."
          },
          "taxRate": {
            "type": "number",
            "description": "Value of the tax. Required when no code is informed.\nThe unit depends on the entry: on a regular tax this is a percentage, while on a\nmonophasic entry (\"...MONOTAXRATE\") it is the ad rem rate - a fixed amount per unit of\nquantity, which multiplies the monophasic calculation basis.",
            "format": "double",
            "nullable": true
          },
          "code": {
            "type": "string",
            "description": "Code of the Tax. Required when no value is informed.",
            "nullable": true
          },
          "included": {
            "type": "boolean",
            "description": "Flag to indicate if the tax value is included in the price.",
            "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\"ZeroRate\" =  Zero Rate Tax.\n\"NotInformed\" = No fee was informed.",
            "nullable": true
          },
          "reducedTaxRate": {
            "type": "number",
            "description": "Reduced Tax Rate",
            "format": "double",
            "nullable": true
          },
          "taxAmount": {
            "type": "number",
            "description": "Calculated value of the tax, as a monetary amount. Coexists with \"taxRate\", which is a\nrate - both can be present on the same entry.\nOn a monophasic entry (\"...MONOTAXRATE\") this carries the monophasic value.\nOnly sent when the workflow parameter \"EnviaCamposReformaTributaria2027\" is set.",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UpdateAttributesCommand": {
        "required": [
          "attributes"
        ],
        "type": "object",
        "properties": {
          "attributes": {
            "minItems": 1,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AttributeValueDto"
            },
            "description": "List of header attributes"
          }
        },
        "additionalProperties": false
      },
      "UpdateAttributesResponse": {
        "type": "object",
        "properties": {
          "correlationId": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "UpdateItemAttributesCommand": {
        "required": [
          "attributes"
        ],
        "type": "object",
        "properties": {
          "attributes": {
            "minItems": 1,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AttributeValueDto"
            },
            "description": "List of item attributes"
          }
        },
        "additionalProperties": false
      },
      "UpdateItemAttributesResponse": {
        "type": "object",
        "properties": {
          "correlationId": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "UpdateStatusAttribute": {
        "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 pre-order attribute.",
            "nullable": true
          },
          "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 pre-order's response screen.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UpdateStatusCommand": {
        "required": [
          "clientSupplierId",
          "status"
        ],
        "type": "object",
        "properties": {
          "clientOrderId": {
            "maxLength": 20,
            "type": "string",
            "description": "ERP Order Number: \n- Filled = it identifies that you should modify an order. \n- Empty = it identifies that you should create an order.",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "description": "Status code",
            "format": "int32"
          },
          "clientSupplierId": {
            "maxLength": 20,
            "minLength": 1,
            "type": "string",
            "description": "Supplier code in the ERP"
          },
          "note": {
            "type": "string",
            "description": "Pre-Order Notes",
            "nullable": true
          },
          "clientObservation": {
            "type": "string",
            "description": "Pre-Order Notes",
            "nullable": true
          },
          "approvalDate": {
            "type": "string",
            "description": "Approval Date/Time",
            "format": "date-time"
          },
          "attributes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UpdateStatusAttribute"
            },
            "description": "List of header attributes",
            "nullable": true
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PreOrderItemStatus"
            },
            "description": "List of Pre-order items",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UpdateStatusResponse": {
        "type": "object",
        "properties": {
          "correlationId": {
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "description": "Please enter your JWT (Without the 'Bearer' word in the beginning).",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "security": [
    {
      "bearer": []
    }
  ],
  "tags": [
    {
      "name": "Associated Processes"
    },
    {
      "name": "Pre-Order Items"
    },
    {
      "name": "Pre-Orders"
    }
  ]
}