Gestión de Facturación
2 min
Este módulo le permite gestionar la facturación y el estado de cuenta de un subcomercio. Al crear nuevas facturas el comercio verá reflejada la misma en su cuenta con el saldo a pagar, adicionalmente el mismo podrá pagar sus facturas desde el panel de Estado de Cuenta en la consola.
Este módulo es optativo y debe pedirse su habiltación al equipo comercial.
Crear Factura
Crea una nueva Factura
POST
https://{suga-id}.sugaway.io/p/operator/billing
Body Parameters
- totalNumberDescription
- currencystringDescription
- uidstringDescription
- entitystringDescription
javascript
var myHeaders = new Headers();
myHeaders.append("Accept", "application/json");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"id": "String"
});
var requestOptions = {
method: 'GET',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.cakes.com", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));200
{
"name": "Cake's name",
}404
{
"message": "Ain't no cake like that."
}{
"invoiceDate": "2024-06-30T00:00:00.000Z",
"uid": "ARG20409501827_06-2024",
"items": [
{
"netoGrabado": 1745.45,
"netoNoGrabado": 0,
"totalExento": 0,
"description": "LICENCIA FRESA",
"taxType": 21,
"productId": 10,
"product": {
"code": 10,
"description": "LICENCIA FRESA",
"isPlus": true,
"isAlreadyPaid": true,
"isPaidToPartner": true
},
"quantity": 1,
"itemTaxTotal": 366.54,
"itemTotal": 1745.45
}
],
"entity": "REF / UID",
"isInvoicePaid": true,
"period": "06-2024",
"fiscalData": {
"fiscalAuthorizationMode": "CAE",
"fullNumber": "FA 00005-00056976",
"shortFullNumber": "FA 00005-00056976",
"longFullNumber": "FACTURA A 00005-00056976",
"nationalAuthorizationCode": "74270691349491",
"nationalAuthorizationCodeExpires": "10/07/2024",
"governmentMessage": "10217 - El credito fiscal discriminado en el presente comprobante solo podra ser computado a efectos del Procedimiento permanente de transicion al Regimen General.",
"number": 56976,
"shortCode": "FA",
"pos": "00005",
"posId": 651,
"generalDocumentTypeId": 1,
"generalDocumentType": "Factura",
"documentTypeId": 1,
"documentType": "A",
"documentCode": "01",
"invoiceNumber": "00005-00056976",
"pointOfSale": "00005",
"documentNumber": "00056976",
"barcode": "20409501827010000574270691349491202407100",
"qrCode": {
"ver": 1,
"fecha": "2024-06-30",
"cuit": "30715123580",
"ptoVta": 5,
"tipoCmp": 1,
"nroCmp": 56976,
"importe": "211199",
"moneda": "PES",
"ctz": 1,
"tipoDocRec": 80,
"nroDocRec": "20409501827",
"tipoCodAut": "E",
"codAut": "74270691349491"
}
},
"total": 2111.9945,
"currency": "ARS",
"dates": {
"issueDate": "30/06/2024",
"serviceStartDate": "01/06/2024",
"serviceEndDate": "30/06/2024"
},
"totals": {
"subtotal": 1745.45,
"taxes": {
"21": 366.54
},
"total": 2111.99,
"paid": 2111.99,
"balance": 0
},
"dueInfo": {
"firstDueDate": "12/07/2024",
"secondDueDate": "19/07/2024",
"secondDueSurcharge": 0,
"secondDueTotal": 0,
"firstDueTimestamp": 1720839599000,
"secondDueTimestamp": 1721444399000
},
"file": {
"uri": "https://prod/ARG20409501827/invoices/ARG20409501827_06-2024.pdf",
"contentType": "application/pdf",
"name": "ARG20409501827_06-2024.pdf"
}
}Eliminar Factura
Elimina una Factura mediante su UID
DELETE
https://{suga-id}.sugaway.io/p/operator/billing/:uid
Path Parameters
- uidstringDescription
javascript
var myHeaders = new Headers();
myHeaders.append("Accept", "application/json");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"id": "String"
});
var requestOptions = {
method: 'GET',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.cakes.com", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));200
{
"name": "Cake's name",
}404
{
"message": "Ain't no cake like that."
}