Skip to main content
POST
/
api
/
v1
/
products
/
bulk-adjustments
La Pyme SDK
import { Lapyme } from "lapyme";

const lapyme = new Lapyme({
  bearerAuth: process.env["LAPYME_API_KEY"] ?? "",
});

const adjustment = await lapyme.productBulkAdjustments.create({
  idempotencyKey: crypto.randomUUID(),
  body: {
    target: "price",
    operationType: "increase",
    adjustmentType: "percentage",
    adjustmentValue: 10,
    selection: {
      type: "specific",
      ids: ["9c692e8b-0f9a-4f7c-8b99-061a2eb188ae"],
    },
  },
});
{
  "request_id": "<string>",
  "data": {
    "product_bulk_adjustment": {
      "object": "<string>",
      "updated": 1,
      "skipped": 1
    }
  },
  "warnings": [
    "<unknown>"
  ]
}

Authorizations

Authorization
string
header
required

Incluí tu API key en el header Authorization con el prefijo Bearer.

Headers

Idempotency-Key
string
required

Clave única para evitar aplicar dos veces el mismo ajuste masivo.

X-Request-Id
string

ID opcional de la solicitud para trazabilidad. Si se omite, el servidor genera uno.

Body

application/json
target
enum<string>
required
Available options:
cost,
price
operation_type
enum<string>
required
Available options:
increase,
decrease
adjustment_type
enum<string>
required
Available options:
percentage,
fixed
adjustment_value
number
required
selection
object
required
category
string<uuid>[]
product_type
enum<string>[]
Available options:
product,
service,
combo,
kit
default_supplier_id
string<uuid>

Response

Ajuste aplicado exitosamente

request_id
string
required
data
object
required
warnings
any[]
required