---
updatedAt: 2026-09-17T08:30:06.000Z
agentTools:
  projectIndex: https://nexp.readme.io/llms.txt
---

# Atualizar inventario de skus por estoque

Use essa api para atualizar o inventário de múltiplos skus de um mesmo estoque

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "logstore",
    "version": "2"
  },
  "servers": [
    {
      "url": "https://{environment}.app",
      "variables": {
        "environment": {
          "default": "environment"
        }
      }
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://example.com/oauth2/token",
            "scopes": {}
          }
        }
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/warehouses/{id}/skus/bulk-upsert": {
      "post": {
        "summary": "Atualizar inventario de skus por estoque",
        "description": "Use essa api para atualizar o inventário de múltiplos skus de um mesmo estoque",
        "operationId": "atualizar-inventario-sku-estoque",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Identificador do estoque no canal de destino",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "x-customer-key",
            "in": "header",
            "description": "Um hash que identifica a conta",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "description": "Chave de acesso",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "skus"
                ],
                "properties": {
                  "notes": {
                    "type": "string",
                    "description": "Descrição curta indicando o porque da atualização do inventário"
                  },
                  "skus": {
                    "type": "array",
                    "description": "Lista de skus que terão o inventário atualizado",
                    "items": {
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Identificador único do sku"
                        },
                        "totalQuantity": {
                          "type": "integer",
                          "description": "Quantidade total do estoque do sku",
                          "format": "int32"
                        },
                        "reservedQuantity": {
                          "type": "integer",
                          "description": "Quantidade reservada no estoque do sku. Essa quantidade será descontada da quantidade total para chegarmos na quantidade disponível",
                          "format": "int32"
                        },
                        "unlimited": {
                          "type": "boolean",
                          "description": "Indica que o sku tem quantidade ilimitada",
                          "default": false
                        },
                        "seilingLimitAfterStockOut": {
                          "type": "integer",
                          "description": "Limite de quantidade que pode ser ultrapassado para esse sku",
                          "format": "int32"
                        },
                        "leadTime": {
                          "type": "string",
                          "description": "Tempo para preparação/envio do sku no estoque. Normalmente é utilizado pelos canais para calcular o prazo de entrega."
                        },
                        "expirationDate": {
                          "type": "string",
                          "description": "Data de validade do sku no fuso UTC",
                          "format": "date-time"
                        },
                        "manufaturingLot": {
                          "type": "string",
                          "description": "Lote de fabricação"
                        },
                        "status": {
                          "type": "string",
                          "description": "Indica o status do inventário",
                          "enum": [
                            "Active",
                            "Inactive",
                            "Draft"
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "totalQuantity",
                        "unlimited",
                        "status"
                      ],
                      "type": "object"
                    }
                  }
                }
              },
              "examples": {
                "Request Example": {
                  "value": {
                    "notes": "string",
                    "skus": [
                      {
                        "code": "string",
                        "totalQuantity": 0,
                        "reservedQuantity": 0,
                        "unlimited": false,
                        "seilingLimitAfterStockOut": 0,
                        "leadTime": "hh:mm:ss",
                        "expirationDate": "1970-01-01T00:00:00.000Z",
                        "manufaturingLot": "string",
                        "status": "string"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "\"01998244-03d1-7f0f-8ffe-08331def95fb\""
                  }
                },
                "schema": {
                  "type": "string",
                  "example": "01998244-03d1-7f0f-8ffe-08331def95fb"
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"type\": \"https://tools.ietf.org/html/rfc9110#section-15.5.1\",\n    \"title\": \"One or more validation errors occurred.\",\n    \"status\": 400,\n    \"errors\": {\n        \"ErrorItem { PropertyName = BulkUpsertAsync, Code = , Message = 23503\": [\n            \"inserção ou atualização em tabela \\\"sku_warehouses\\\" viola restrição de chave estrangeira \\\"fk_sku_warehouses_sku_sku_id\\\"\\r\\n\\r\\nDETAIL: Detail redacted as it may contain sensitive data. Specify 'Include Error Detail' in the connection string to include this information. }\"\n        ]\n    },\n    \"traceId\": \"00-48cadb787033fe9bc48829b4294f63a3-9b57b59be46b89c0-01\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "example": "https://tools.ietf.org/html/rfc9110#section-15.5.1"
                    },
                    "title": {
                      "type": "string",
                      "example": "One or more validation errors occurred."
                    },
                    "status": {
                      "type": "integer",
                      "example": 400,
                      "default": 0
                    },
                    "errors": {
                      "type": "object",
                      "properties": {
                        "ErrorItem { PropertyName = BulkUpsertAsync, Code = , Message = 23503": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "example": "inserção ou atualização em tabela \"sku_warehouses\" viola restrição de chave estrangeira \"fk_sku_warehouses_sku_sku_id\"\r\n\r\nDETAIL: Detail redacted as it may contain sensitive data. Specify 'Include Error Detail' in the connection string to include this information. }"
                          }
                        }
                      }
                    },
                    "traceId": {
                      "type": "string",
                      "example": "00-48cadb787033fe9bc48829b4294f63a3-9b57b59be46b89c0-01"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "409",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"type\": \"https://tools.ietf.org/html/rfc9110#section-15.5.1\",\n    \"title\": \"One or more validation errors occurred.\",\n    \"status\": 409,\n    \"errors\": {       \n    },\n    \"traceId\": \"00-48cadb787033fe9bc48829b4294f63a3-9b57b59be46b89c0-01\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "example": "https://tools.ietf.org/html/rfc9110#section-15.5.1"
                    },
                    "title": {
                      "type": "string",
                      "example": "One or more validation errors occurred."
                    },
                    "status": {
                      "type": "integer",
                      "example": 409,
                      "default": 0
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    },
                    "traceId": {
                      "type": "string",
                      "example": "00-48cadb787033fe9bc48829b4294f63a3-9b57b59be46b89c0-01"
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```