Skip to main content
POST
/
api
/
v1
/
credit-notes
Crear nota de crédito independiente
curl --request POST \
  --url https://api.lapyme.com.ar/api/v1/credit-notes \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: <idempotency-key>' \
  --data '
{
  "customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "point_of_sale_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "issue_date": "2023-12-25",
  "items": [
    {
      "name": "<string>",
      "quantity": 123,
      "unit_price": 1,
      "tax_rate_id": 2,
      "id": "<string>",
      "product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "product_name": "<string>",
      "product_sku": "<string>",
      "is_exempt": false,
      "discount_percentage": 50,
      "account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "account_name": "<string>",
      "warehouse_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "cost_center_1_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "cost_center_2_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "cost_center_3_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
    }
  ],
  "register_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "operator_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "cbtes_asoc": {
    "tipo": 2,
    "punto_venta": 2,
    "numero": 2
  },
  "associated_period": {
    "desde": "2023-12-25",
    "hasta": "2023-12-25"
  },
  "cost_centers": {
    "cost_center_1_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "cost_center_2_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "cost_center_3_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  },
  "restock_inventory": false,
  "warehouse_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "notes": "<string>"
}
'
{
  "request_id": "<string>",
  "data": {
    "credit_note": {
      "object": "credit_note",
      "sale_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "total": 123,
      "invoice_status": "<string>",
      "invoice_number": 123,
      "formatted_invoice_number": "<string>",
      "voucher_type": "<string>"
    }
  },
  "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 estable para deduplicar reintentos de la misma operación.

Body

application/json
customer_id
string<uuid>
required
voucher_type
enum<integer>
required

AFIP credit-note voucher type.

Available options:
3,
8,
13,
53,
95,
100,
203,
208,
213
point_of_sale_id
string<uuid>
required
issue_date
string<date>
required
items
object[]
required
Minimum array length: 1
register_id
string<uuid>
operator_id
string<uuid>
cbtes_asoc
object
associated_period
object

Associated service period. For fiscal credit notes, this can be used instead of cbtes_asoc.

currency
enum<string>
Available options:
PES,
DOL
cost_centers
object
restock_inventory
boolean
default:false
warehouse_id
string<uuid>
notes
string

Response

Nota de crédito creada exitosamente

request_id
string
data
object
warnings
any[]