Skip to main content
POST
/
api
/
v1
/
suppliers
La Pyme SDK
import { Lapyme } from "lapyme";

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

const supplier = await lapyme.suppliers.createSupplier({
  idempotencyKey: crypto.randomUUID(),
  body: {
    name: "Textiles Norte",
    taxId: "30700111222",
    email: "ventas@textilesnorte.com.ar",
  },
});
{
  "request_id": "<string>",
  "data": {
    "supplier": {
      "object": "<string>",
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>",
      "company_name": "<string>",
      "description": "<string>",
      "email": "<string>",
      "phone": "<string>",
      "tax_id": "<string>",
      "tax_id_type": "<string>",
      "tax_category": "<string>",
      "payment_term_id": "<string>",
      "is_active": true,
      "country": "<string>",
      "province_id": "<string>",
      "city": "<string>",
      "address": "<string>",
      "apartment": "<string>",
      "postal_code": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z"
    },
    "idempotent_replay": true
  },
  "warnings": [
    "<unknown>"
  ]
}

Authorizations

Authorization
string
header
required

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

Headers

Idempotency-Key
string
required

Body

application/json
name
string
required
company_name
string | null
description
string | null
email
string<email> | null
phone
string | null
tax_id
string | null
tax_id_type
enum<string> | null
Available options:
CUIL/CUIT,
DNI
tax_category
enum<string>
Available options:
registered_vat_taxpayer,
final_consumer,
monotributo_taxpayer,
vat_exempt,
vat_not_applicable
country
string
province
string
city
string | null
address
string | null
apartment
string | null
postal_code
string | null
payment_term_id
string | null
is_active
boolean

Response

Proveedor creado exitosamente

request_id
string
required
data
object
required
warnings
any[]
required