{
  "openapi": "3.0.4",
  "info": {
    "title": "Suppliers API",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.mercadoe.com"
    }
  ],
  "paths": {
    "/v1/suppliers": {
      "post": {
        "tags": [
          "Suppliers"
        ],
        "summary": "Create a Supplier",
        "description": "Create a new supplier by providing the trading name, city, documents related to company national registration, and other details.",
        "parameters": [
          {
            "name": "X-ME-CORRELATION-ID",
            "in": "header",
            "description": "Internal client code to be identified in the webhook. It can be, for example, a product code in your ERP, an order number, etc.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCommand"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Suppliers"
        ],
        "summary": "Get all suppliers by query parameters",
        "description": "Get a list of all suppliers that are available to the connected user and query parameters.",
        "parameters": [
          {
            "name": "clientSupplierId",
            "in": "query",
            "description": "the client supplier id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "description": "the page number must be an integer greater than or equal to 1",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "the page size must be an integer greater than or equal to 10",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetManyMinimalResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/suppliers/{supplierId}": {
      "get": {
        "tags": [
          "Suppliers"
        ],
        "summary": "Get a Supplier by supplierId",
        "description": "Get information about a specific supplier with the given supplierId.",
        "parameters": [
          {
            "name": "supplierId",
            "in": "path",
            "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"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Suppliers"
        ],
        "summary": "Update a supplier based on the supplierId",
        "description": "Change a specific supplier field with a provided value.",
        "parameters": [
          {
            "name": "supplierId",
            "in": "path",
            "description": "the supplier id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "X-ME-CORRELATION-ID",
            "in": "header",
            "description": "Internal client code to be identified in the webhook. It can be, for example, a product code in your ERP, an order number, etc.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCommand"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/suppliers/{supplierId}/attributes": {
      "get": {
        "tags": [
          "Suppliers"
        ],
        "summary": "Get the supplier attributes based on the supplier Id.",
        "description": "Get information about the attributes of a specific supplier with the given supplierId. \nThe attributes are customized fields used for integration with the client in order to provide some additional information from the client internal system.",
        "parameters": [
          {
            "name": "supplierId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAttributesResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/suppliers/{supplierId}/accounts": {
      "get": {
        "tags": [
          "Suppliers"
        ],
        "summary": "Get the supplier accounts based on the supplierId",
        "description": "Retrieve information about the supplier accounts with the given supplierId",
        "parameters": [
          {
            "name": "supplierId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAccountsResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/suppliers/{supplierId}/groups": {
      "put": {
        "tags": [
          "Suppliers"
        ],
        "summary": "Remove a supplier from one or more associated groups",
        "description": "Remove a supplier from one or more associated groups specified by its supplierId and group description.",
        "parameters": [
          {
            "name": "supplierId",
            "in": "path",
            "description": "the supplier id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "X-ME-CORRELATION-ID",
            "in": "header",
            "description": "Internal client code to be identified in the webhook. It can be, for example, a product code in your ERP, an order number, etc.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteGroupsRelationshipsCommand"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteGroupsRelationshipsResponse"
                }
              }
            }
          },
          "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/suppliers/{supplierId}/business-organizations": {
      "get": {
        "tags": [
          "Suppliers"
        ],
        "summary": "Get the supplier business organizations based on the supplierId",
        "description": "Retrieves information about the business organizations for a specific supplier with the given supplierId.",
        "parameters": [
          {
            "name": "supplierId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetBusinessOrganizationsResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/suppliers/{supplierId}/business-organizations/payment-conditions": {
      "get": {
        "tags": [
          "Suppliers"
        ],
        "summary": "Get payment conditions for business organizations by supplier based on the supplierId",
        "description": "Retrieves information about the business organizations for a specific supplier with the given supplierId.",
        "parameters": [
          {
            "name": "supplierId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetBusinessOrganizationPaymentConditionsResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/suppliers/document": {
      "post": {
        "tags": [
          "Suppliers"
        ],
        "summary": "Get Suppliers by Document",
        "description": "Retrieves supplier information based on the provided document number (such as tax ID or registration number).",
        "parameters": [
          {
            "name": "X-ME-CORRELATION-ID",
            "in": "header",
            "description": "Internal client code to be identified in the webhook. It can be, for example, a product code in your ERP, an order number, etc.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GetByDocumentQuery"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/GetByDocumentQuery"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/GetByDocumentQuery"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetByDocumentResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AdditionalEmail": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "description": "Supplier additional email (separated by ;)",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CreateCommand": {
        "required": [
          "address",
          "addressNumber",
          "city",
          "companyName",
          "contact",
          "country",
          "document",
          "email",
          "neighborhood",
          "phoneNumber",
          "postalCode",
          "state",
          "tradingName"
        ],
        "type": "object",
        "properties": {
          "clientSupplierId": {
            "type": "string",
            "description": "Supplier code in the ERP"
          },
          "tradingName": {
            "minLength": 1,
            "type": "string",
            "description": "Supplier's trade name"
          },
          "companyName": {
            "minLength": 1,
            "type": "string",
            "description": "Supplier's company name"
          },
          "contact": {
            "minLength": 1,
            "type": "string",
            "description": "Supplier contact name"
          },
          "address": {
            "minLength": 1,
            "type": "string",
            "description": "Supplier address"
          },
          "city": {
            "minLength": 1,
            "type": "string",
            "description": "Supplier city"
          },
          "state": {
            "minLength": 1,
            "type": "string",
            "description": "Supplier state"
          },
          "country": {
            "minLength": 1,
            "type": "string",
            "description": "Supplier country"
          },
          "addressNumber": {
            "minLength": 1,
            "type": "string",
            "description": "Supplier's address number"
          },
          "neighborhood": {
            "minLength": 1,
            "type": "string",
            "description": "Supplier neighborhood"
          },
          "complement": {
            "type": "string",
            "description": "Complement of the supplier's address",
            "nullable": true
          },
          "postalCode": {
            "minLength": 1,
            "type": "string",
            "description": "Supplier postal code"
          },
          "phoneNumber": {
            "minLength": 1,
            "type": "string",
            "description": "Supplier phone number"
          },
          "email": {
            "minLength": 1,
            "type": "string",
            "description": "Supplier email"
          },
          "stateRegistrationNumber": {
            "type": "string",
            "description": "Supplier state registration number",
            "deprecated": true
          },
          "stateRegistrations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StateRegistration"
            },
            "description": "Supplier state registrations",
            "nullable": true
          },
          "languageId": {
            "type": "integer",
            "description": "Default language selection:\n- 0 = Portuguese (BR)\n- 1 = English\n- 2 = Spanish",
            "format": "int32",
            "nullable": true
          },
          "supplierGroup": {
            "type": "string",
            "description": "Supplier Group",
            "deprecated": true
          },
          "isDeactivated": {
            "type": "boolean",
            "description": "Is the supplier deactivated/blocked? (True/False)",
            "nullable": true
          },
          "paymentCondition": {
            "type": "string",
            "description": "Payment terms and conditions agreed with the supplier",
            "nullable": true
          },
          "additionalEmails": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdditionalEmail"
            },
            "description": "Supplier additional email"
          },
          "document": {
            "$ref": "#/components/schemas/Document"
          },
          "attributes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SupplierAttribute"
            },
            "description": "Attributes of the supplier, consisting of a name and a value.",
            "nullable": true
          },
          "accounts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SupplierAccount"
            },
            "description": "Supplier's bank accounts",
            "nullable": true
          },
          "homologationStatus": {
            "type": "string",
            "description": "Homologation Status",
            "nullable": true
          },
          "groups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Group"
            },
            "description": "List with the relationships between the group and the supplier",
            "nullable": true
          },
          "createdByName": {
            "type": "string",
            "description": "Supplier creator’s name\nMay be the name of the user who created the supplier, or one of the predefined values:\n\"Integração\", \"Institucional\", or \"Portal\".",
            "nullable": true
          },
          "createdByEmail": {
            "type": "string",
            "description": "Supplier creator’s email",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CreateResponse": {
        "type": "object",
        "properties": {
          "correlationId": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "DeleteGroupsRelationshipsCommand": {
        "type": "object",
        "properties": {
          "groups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Group"
            },
            "description": "List with the relationships between the group and the supplier"
          },
          "deleteAllSupplierGroupRelationships": {
            "type": "boolean",
            "description": "This flag deletes all relationships between a supplier and groups of suppliers",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DeleteGroupsRelationshipsResponse": {
        "type": "object",
        "properties": {
          "correlationId": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "Document": {
        "type": "object",
        "properties": {
          "number": {
            "type": "string",
            "description": "Document identification number used for validation against the supplier's registered document. Special characters (dots, slashes, hyphens, etc.) are automatically removed based on the document type. Not used to overwrite an existing document; only saved if the supplier has no document number registered.",
            "nullable": true
          },
          "type": {
            "type": "string",
            "description": "Type of legal document used in the company's national registration (e.g. CNPJ, IE). The value is automatically normalized to uppercase. Not used to overwrite an existing document; only saved if the supplier has no document type registered.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DocumentTypeEnum": {
        "enum": [
          "Cnpj",
          "Cpf",
          "Cuit",
          "Rut",
          "Other"
        ],
        "type": "string",
        "description": "Represents the supplier's document type."
      },
      "GetAccountsResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetAccountsResponseData"
            }
          },
          "hits": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "next": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetAccountsResponseData": {
        "type": "object",
        "properties": {
          "supplierAccountsId": {
            "type": "integer",
            "description": "A unique identifier or alias for the supplier accounts",
            "format": "int32",
            "nullable": true
          },
          "bank": {
            "type": "string",
            "description": "Bank number"
          },
          "branch": {
            "type": "string",
            "description": "Bank branch"
          },
          "number": {
            "type": "string",
            "description": "Bank account number"
          },
          "checkDigit": {
            "type": "string",
            "description": "The check digit of the account number"
          },
          "branchCodeDigit": {
            "type": "string",
            "description": "The digit of the branch code"
          },
          "holderName": {
            "type": "string",
            "description": "Bank account holder name"
          },
          "isActive": {
            "type": "boolean",
            "description": "Flag to identify if the account is active",
            "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 supplier 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
      },
      "GetBusinessOrganizationPaymentConditionsResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetBusinessOrganizationPaymentConditionsResponseData"
            }
          },
          "hits": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "next": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetBusinessOrganizationPaymentConditionsResponseData": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Company code",
            "nullable": true
          },
          "entityType": {
            "type": "string",
            "description": "Type of organizational structure. Example: Company, branch, department.",
            "nullable": true
          },
          "paymentConditionId": {
            "type": "integer",
            "description": "Default Payment Condition Number",
            "format": "int32"
          },
          "paymentConditionCode": {
            "type": "string",
            "description": "Default Payment Condition Code",
            "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": {
          "clientSupplierId": {
            "type": "string",
            "description": "Supplier code in the client's ERP",
            "nullable": true
          },
          "entityType": {
            "type": "string",
            "description": "Type of organizational structure. Example: Company, branch, department.",
            "nullable": true
          },
          "code": {
            "type": "string",
            "description": "Company code",
            "nullable": true
          },
          "isGeneric": {
            "type": "boolean",
            "description": "Is the supplier generic? (True/False)"
          },
          "isDeactivated": {
            "type": "boolean",
            "description": "Is the supplier deactivated/blocked? (True/False)"
          },
          "defaultPaymentConditionId": {
            "type": "integer",
            "description": "Payment Condition Number",
            "format": "int32"
          },
          "defaultPaymentConditionCode": {
            "type": "string",
            "description": "Payment Condition Code",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetByDocumentQuery": {
        "type": "object",
        "properties": {
          "documentType": {
            "$ref": "#/components/schemas/DocumentTypeEnum"
          },
          "documentNumber": {
            "type": "string",
            "description": "Number of the document"
          },
          "pageNumber": {
            "type": "integer",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "GetByDocumentResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetByDocumentResponseData"
            }
          },
          "hits": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "next": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetByDocumentResponseData": {
        "type": "object",
        "properties": {
          "supplierId": {
            "type": "integer",
            "description": "Supplier Id in client's ERP",
            "format": "int32"
          },
          "clientSupplierId": {
            "type": "string",
            "description": "Supplier code in the ERP",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetByIdResponse": {
        "type": "object",
        "properties": {
          "supplierId": {
            "type": "integer",
            "description": "ME Supplier ID",
            "format": "int32"
          },
          "clientSupplierId": {
            "type": "string",
            "description": "Supplier code in the ERP",
            "nullable": true
          },
          "tradingName": {
            "type": "string",
            "description": "Supplier's trade name"
          },
          "companyName": {
            "type": "string",
            "description": "Supplier's company name",
            "nullable": true
          },
          "contact": {
            "type": "string",
            "description": "Supplier contact name",
            "nullable": true
          },
          "address": {
            "type": "string",
            "description": "Supplier address",
            "nullable": true
          },
          "city": {
            "type": "string",
            "description": "Supplier city"
          },
          "addressNumber": {
            "type": "string",
            "description": "Supplier's address number",
            "nullable": true
          },
          "complement": {
            "type": "string",
            "description": "Complement of the supplier's address",
            "nullable": true
          },
          "neighborhood": {
            "type": "string",
            "description": "Supplier neighborhood",
            "nullable": true
          },
          "state": {
            "type": "string",
            "description": "Supplier state"
          },
          "country": {
            "type": "string",
            "description": "Supplier country",
            "nullable": true
          },
          "postalCode": {
            "type": "string",
            "description": "Supplier postal code",
            "nullable": true
          },
          "phoneNumber": {
            "type": "string",
            "description": "Supplier phone number",
            "nullable": true
          },
          "email": {
            "type": "string",
            "description": "Supplier email",
            "nullable": true
          },
          "languageId": {
            "type": "integer",
            "description": "Default language selection:\n- 0 = Portuguese (BR)\n- 1 = English\n- 2 = Spanish",
            "format": "int32",
            "nullable": true
          },
          "supplierGroup": {
            "type": "string",
            "description": "Supplier Group",
            "nullable": true
          },
          "isDeactivated": {
            "type": "boolean",
            "description": "Is the supplier deactivated/blocked? (True/False)",
            "nullable": true
          },
          "stateRegistrationNumber": {
            "type": "string",
            "description": "Supplier state registration number",
            "nullable": true,
            "deprecated": true
          },
          "stateRegistrations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StateRegistration"
            },
            "description": "Supplier state registrations",
            "nullable": true
          },
          "homologationStatus": {
            "type": "string",
            "description": "Homologation Status",
            "nullable": true
          },
          "paymentCondition": {
            "type": "string",
            "description": "<summary>CondicaoPagamentoDefault</summary>",
            "nullable": true
          },
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Document"
            },
            "description": "Data related to the company national registration documents."
          },
          "additionalEmails": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdditionalEmail"
            },
            "description": "Supplier additional email (separated by ;)",
            "nullable": true
          },
          "createdByName": {
            "type": "string",
            "description": "Supplier creator’s name\nMay be the name of the user who created the supplier, or one of the predefined values:\n\"Integração\", \"Institucional\", or \"Portal\".",
            "nullable": true
          },
          "createdByEmail": {
            "type": "string",
            "description": "Supplier creator’s email",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetManyMinimalResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetByIdResponse"
            }
          },
          "hits": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "next": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Group": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "description": "Group description"
          }
        },
        "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": {}
      },
      "StateRegistration": {
        "type": "object",
        "properties": {
          "stateRegistrationNumber": {
            "type": "string",
            "description": "State registration number of the supplier."
          },
          "state": {
            "type": "string",
            "description": "Brazilian state code (UF) associated with the state registration."
          },
          "isDefault": {
            "type": "boolean",
            "description": "Indicates whether this is the supplier's default state registration."
          },
          "isActive": {
            "type": "boolean",
            "description": "Indicates whether this state registration is active."
          }
        },
        "additionalProperties": false
      },
      "SupplierAccount": {
        "type": "object",
        "properties": {
          "supplierAccountId": {
            "type": "integer",
            "description": "Supplier accounts id",
            "format": "int32",
            "nullable": true
          },
          "bank": {
            "type": "string",
            "description": "Bank number"
          },
          "branch": {
            "type": "string",
            "description": "Bank branch"
          },
          "number": {
            "type": "string",
            "description": "Bank account number"
          },
          "checkDigit": {
            "type": "string",
            "description": "Check digit number"
          },
          "branchCodeDigit": {
            "type": "string",
            "description": "Branch code digit"
          },
          "holderName": {
            "type": "string",
            "description": "Bank account holder name"
          },
          "isActive": {
            "type": "boolean",
            "description": "Flag to identify if the account is active",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SupplierAttribute": {
        "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 supplier 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
      },
      "UpdateCommand": {
        "type": "object",
        "properties": {
          "contact": {
            "type": "string",
            "description": "Supplier contact name"
          },
          "phone": {
            "type": "string",
            "description": "Supplier phone number",
            "deprecated": true
          },
          "email": {
            "type": "string",
            "description": "Supplier email"
          },
          "clientSupplierId": {
            "type": "string",
            "description": "Supplier code in the ERP"
          },
          "isDeactivated": {
            "type": "boolean",
            "description": "Is the supplier deactivated/blocked? (True/False)",
            "nullable": true
          },
          "additionalEmails": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdditionalEmail"
            },
            "description": "Supplier additional email",
            "nullable": true
          },
          "attributes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SupplierAttribute"
            },
            "description": "Attributes of the supplier, consisting of a name and a value.",
            "nullable": true
          },
          "tradingName": {
            "type": "string",
            "description": "Supplier's trade name",
            "nullable": true
          },
          "companyName": {
            "type": "string",
            "description": "Supplier's company name",
            "nullable": true
          },
          "address": {
            "type": "string",
            "description": "Supplier address",
            "nullable": true
          },
          "city": {
            "type": "string",
            "description": "Supplier city",
            "nullable": true
          },
          "state": {
            "type": "string",
            "description": "Supplier state",
            "nullable": true
          },
          "country": {
            "type": "string",
            "description": "Supplier country",
            "nullable": true
          },
          "addressNumber": {
            "type": "string",
            "description": "Supplier's address number",
            "nullable": true
          },
          "neighborhood": {
            "type": "string",
            "description": "Supplier neighborhood",
            "nullable": true
          },
          "complement": {
            "type": "string",
            "description": "Complement of the supplier's address",
            "nullable": true
          },
          "postalCode": {
            "type": "string",
            "description": "Supplier postal code",
            "nullable": true
          },
          "phoneNumber": {
            "type": "string",
            "description": "Supplier phone number",
            "nullable": true
          },
          "stateRegistrationNumber": {
            "type": "string",
            "description": "Supplier state registration number",
            "nullable": true,
            "deprecated": true
          },
          "stateRegistrations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StateRegistration"
            },
            "description": "State registrations to insert or update. Registrations not informed are kept unchanged.",
            "nullable": true
          },
          "languageId": {
            "type": "integer",
            "description": "Default language selection:\n- 0 = Portuguese (BR)\n- 1 = English\n- 2 = Spanish",
            "format": "int32",
            "nullable": true
          },
          "supplierGroup": {
            "type": "string",
            "description": "Supplier group",
            "nullable": true,
            "deprecated": true
          },
          "homologationStatus": {
            "type": "string",
            "description": "Homologation Status",
            "nullable": true
          },
          "document": {
            "$ref": "#/components/schemas/Document"
          },
          "groups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Group"
            },
            "description": "List with the relationships between the group and the supplier",
            "nullable": true
          },
          "paymentCondition": {
            "type": "string",
            "description": "<summary>CondicaoPagamentoDefault</summary>",
            "nullable": true
          },
          "accounts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SupplierAccount"
            },
            "description": "Supplier's bank accounts",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UpdateResponse": {
        "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": "Suppliers"
    }
  ]
}