Compras (Purchases)

Compras (Purchases)

Obtener lista de compras

Este endpoint requiere autenticación
  1. GET /webapi/purchases?skip=0&maxRecords=10
Respuesta Esperada:
  1. {
  2.     "status":"ok",
  3.     "data":
  4.     [
  5.         {
  6.             "Balance": 0.0,
  7.             "DiscountAmount": 0.0,
  8.             "ExpenseTypeName": null,
  9.             "formatedDate": null,
  10.             "ID": "00000000-0000-0000-0000-000000000000",
  11.             "IncomeTaxRetentionAmount": 0.0,
  12.             "OtherTaxRetentionAmount": 0.0,
  13.             "PaymentsAplied": 0.0,
  14.             "ProjectCustomerName": null,
  15.             "ProjectName": null,
  16.             "Status": null,
  17.             "Subtotal": 0.0,
  18.             "TaxAmount": 0.0,
  19.             "TaxRetentionAmount": 0.0,
  20.             "Total": 0.0,
  21.             "vendorName": null,
  22.             "VendorTaxPayerID": null,
  23.             "AccountID": null,
  24.             "CurrencyID": null,
  25.             "DiscountPercent": 0.0,
  26.             "DocDate": "0001-01-01T00:00:00",
  27.             "DocID": null,
  28.             "ExchangeRate": 0.0,
  29.             "ExchangeRate2": 0.0,
  30.             "ExpenseType": null,
  31.             "ImageFilePath": null,
  32.             "Notes": null,
  33.             "NotesVendor": null,
  34.             "PaymentTerms": null,
  35.             "PDFFilePath": null,
  36.             "ProjectID": null,
  37.             "RelatedDocID": null,
  38.             "WarehouseID": null,
  39.             "XMLFilePath": null,
  40.             "Items": 
  41.             [
  42.                 {
  43.                     "ItemID": null,
  44.                     "ItemName": null,
  45.                     "ItemSKU": null,
  46.                     "Price": 0.0,
  47.                     "PurchaseAccountCode": null,
  48.                     "PurchaseAccountID": null,
  49.                     "Quantity": 0.0,
  50.                     "TaxID": null,
  51.                     "Total": 0.0
  52.                 }
  53.             ],
  54.             "Retentions": 
  55.             [
  56.                 {
  57.                     "Amount": 0.0,
  58.                     "RetentionID": "00000000-0000-0000-0000-000000000000"
  59.                 }
  60.             ]
  61.         }
  62.     ]
  63. }


Obtener lista de compras sin pagar

Este endpoint requiere autenticación
  1. POST /webapi/getunpaidpurchases?CurrencyID=USD&VendorID=00000000-0000-0000-0000-000000000000
Respuesta Esperada:
  1. {
  2.     "status":"ok",
  3.     "data":
  4.     [
  5.         {
  6.             "Balance": 0.0,
  7.             "DiscountAmount": 0.0,
  8.             "ExpenseTypeName": null,
  9.             "formatedDate": null,
  10.             "ID": "00000000-0000-0000-0000-000000000000",
  11.             "IncomeTaxRetentionAmount": 0.0,
  12.             "OtherTaxRetentionAmount": 0.0,
  13.             "PaymentsAplied": 0.0,
  14.             "ProjectCustomerName": null,
  15.             "ProjectName": null,
  16.             "Status": null,
  17.             "Subtotal": 0.0,
  18.             "TaxAmount": 0.0,
  19.             "TaxRetentionAmount": 0.0,
  20.             "Total": 0.0,
  21.             "vendorName": null,
  22.             "VendorTaxPayerID": null,
  23.             "AccountID": null,
  24.             "CurrencyID": null,
  25.             "DiscountPercent": 0.0,
  26.             "DocDate": "0001-01-01T00:00:00",
  27.             "DocID": null,
  28.             "ExchangeRate": 0.0,
  29.             "ExchangeRate2": 0.0,
  30.             "ExpenseType": null,
  31.             "ImageFilePath": null,
  32.             "Notes": null,
  33.             "NotesVendor": null,
  34.             "PaymentTerms": null,
  35.             "PDFFilePath": null,
  36.             "ProjectID": null,
  37.             "RelatedDocID": null,
  38.             "WarehouseID": null,
  39.             "XMLFilePath": null,
  40.             "Items": 
  41.             [
  42.                 {
  43.                     "ItemID": null,
  44.                     "ItemName": null,
  45.                     "ItemSKU": null,
  46.                     "Price": 0.0,
  47.                     "PurchaseAccountCode": null,
  48.                     "PurchaseAccountID": null,
  49.                     "Quantity": 0.0,
  50.                     "TaxID": null,
  51.                     "Total": 0.0
  52.                 }
  53.             ],
  54.             "Retentions": 
  55.             [
  56.                 {
  57.                     "Amount": 0.0,
  58.                     "RetentionID": "00000000-0000-0000-0000-000000000000"
  59.                 }
  60.             ]
  61.         }
  62.     ]
  63. }


Agregar Compra

Este endpoint requiere autenticación
  1. POST /webapi/purchases

Solicitud esperada (body):
  1. {
  2.     "AccountID": null,
  3.     "CurrencyID": null,
  4.     "DiscountPercent": 0.0,
  5.     "DocDate": "0001-01-01T00:00:00",
  6.     "DocID": null,
  7.     "ExchangeRate": 0.0,
  8.     "ExchangeRate2": 0.0,
  9.     "ExpenseType": null,
  10.     "ImageFilePath": null,            
  11.     "Notes": null,
  12.     "NotesVendor": null,
  13.     "PaymentTerms": null,
  14.     "PDFFilePath": null,
  15.     "ProjectID": null,
  16.     "RelatedDocID": null,
  17.     "WarehouseID": null,
  18.     "XMLFilePath": null,
  19.     "Items": 
  20.     [
  21.         {
  22.             "ItemID": null,
  23.             "ItemName": null,
  24.             "ItemSKU": null,
  25.             "Price": 0.0,
  26.             "PurchaseAccountID": null,
  27.             "Quantity": 0.0,
  28.             "TaxID": null,
  29.             "Total": 0.0
  30.         }
  31.     ],
  32.     "Retentions": 
  33.     [
  34.         {
  35.             "Amount": 0.0,
  36.             "RetentionID": "00000000-0000-0000-0000-000000000000"
  37.         }
  38.     ]
  39. }

Respuesta Esperada:
  1. {
  2.     "status":"ok",
  3.     "data":"bde77223-a6a6-4ce9-a52a-7958a2c8365e"
  4. }

Editar Compra

Este endpoint requiere autenticación
  1. PUT /webapi/purchases

Solicitud esperada (body):
  1. {
  2.     "ID":"00000000-0000-0000-0000-000000000000",
  3.     "AccountID": null,
  4.     "CurrencyID": null,
  5.     "DiscountPercent": 0.0,
  6.     "DocDate": "0001-01-01T00:00:00",
  7.     "DocID": null,
  8.     "ExchangeRate": 0.0,
  9.     "ExchangeRate2": 0.0,
  10.     "ExpenseType": null,
  11.     "ImageFilePath": null,            
  12.     "Notes": null,
  13.     "NotesVendor": null,
  14.     "PaymentTerms": null,
  15.     "PDFFilePath": null,
  16.     "ProjectID": null,
  17.     "RelatedDocID": null,
  18.     "WarehouseID": null,
  19.     "XMLFilePath": null,
  20.     "Items": 
  21.     [
  22.         {
  23.             "ItemID": null,
  24.             "ItemName": null,
  25.             "ItemSKU": null,
  26.             "Price": 0.0,
  27.             "PurchaseAccountID": null,
  28.             "Quantity": 0.0,
  29.             "TaxID": null,
  30.             "Total": 0.0
  31.         }
  32.     ],
  33.     "Retentions": 
  34.     [
  35.         {
  36.             "Amount": 0.0,
  37.             "RetentionID": "00000000-0000-0000-0000-000000000000"
  38.         }
  39.     ]
  40. }

Respuesta Esperada:
  1. {
  2.     "status":"ok",
  3.     "data":null
  4. }

Eliminar Compra

Este endpoint requiere autenticación
  1. DELETE /webapi/purchases?ID=a2e0b740-f036-4d47-8eb3-d64849d13a8e

Respuesta Esperada:
  1. {
  2.     "status":"ok",
  3.     "data":null
  4. }

    • Related Articles

    • Retenciones (Retentions)

      Obtener lista de retenciones Este endpoint requiere autenticación GET /webapi/retentions Respuesta Esperada: {     "status":"ok",     "data":     [         {             "ID":"8948b728-50dc-45aa-848b-7075acf8f524",             "Name": "30% IVA",     ...
    • Crea Bancos

      Creación de Bancos:  AccountingLive te ofrece el módulo de bancos para que puedas tener el control de dinero de tu negocio y facilitar la administración de tus cuentas. Puedes gestionar cuentas bancarias para hacer tus depósitos, realizar pagos, ...