AlphaAlpha Docs
API ReferenceAp invoices

Create a new AP invoice

POST
/ap-invoices
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:18080/api/v1/ap-invoices" \  -H "Content-Type: application/json" \  -d '{    "currency": "string",    "dueDate": "2019-08-24T14:15:22Z",    "invoiceDate": "2019-08-24T14:15:22Z",    "rows": [      {        "quantity": 0.1,        "unitPrice": 0.1      }    ],    "subsidiaryId": "string"  }'
{
  "attachments": [
    {
      "blobId": "string",
      "created": "2019-08-24T14:15:22Z",
      "extension": "string",
      "fileSize": 0,
      "name": "string",
      "type": "IMAGE"
    }
  ],
  "classification": {
    "category": "string",
    "costCenterId": "string",
    "glAccountId": "string",
    "projectId": "string",
    "subcategory": "string"
  },
  "classificationMethod": "MANUAL",
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "currency": "string",
  "daysOverdue": 0,
  "dueDate": "2019-08-24T14:15:22Z",
  "id": "string",
  "invoiceDate": "2019-08-24T14:15:22Z",
  "invoiceNumber": "string",
  "isOverdue": true,
  "linkedPurchaseOrders": [
    {
      "allocatedAmount": 0.1,
      "costType": "string",
      "created": "2019-08-24T14:15:22Z",
      "createdBy": "string",
      "purchaseOrderId": "string",
      "purchaseOrderNumber": "string",
      "purchaseOrderStatus": "string",
      "purchaseOrderTotal": 0.1,
      "stockAdjustmentApplied": true
    }
  ],
  "note": "string",
  "number": "string",
  "outstandingAmount": 0.1,
  "paidAmount": 0.1,
  "paidDate": "2019-08-24T14:15:22Z",
  "paymentStatus": "UNPAID",
  "payments": [
    {
      "amount": 0.1,
      "bankTransactionId": "string",
      "created": "2019-08-24T14:15:22Z",
      "createdBy": "string",
      "date": "2019-08-24T14:15:22Z",
      "id": "string",
      "note": "string",
      "paymentMethod": "BANK_TRANSFER",
      "reference": "string"
    }
  ],
  "pdf": {
    "blobId": "string",
    "created": "2019-08-24T14:15:22Z",
    "extension": "string",
    "fileSize": 0,
    "name": "string",
    "type": "IMAGE"
  },
  "receivedDate": "2019-08-24T14:15:22Z",
  "referenceNumber": "string",
  "rows": [
    {
      "description": "string",
      "glAccountId": "string",
      "id": "string",
      "productId": "string",
      "quantity": 0.1,
      "taxAmount": 0.1,
      "taxRate": 0.1,
      "total": 0.1,
      "totalWithTax": 0.1,
      "unitPrice": 0.1
    }
  ],
  "status": "DRAFT",
  "subsidiaryId": "string",
  "subtotal": 0.1,
  "supplierEmail": "string",
  "supplierId": "string",
  "supplierName": "string",
  "taxAmount": 0.1,
  "tenantId": "string",
  "totalAmount": 0.1,
  "totalLinkedAmount": 0.1,
  "unlinkedAmount": 0.1,
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}