Search Results for

    Show / Hide Table of Contents

    Document allocations

    Document allocations are performed at the document header level and are the basis of calculating the outstanding of a document.

    • not all types of documents can be allocated

    • criteria for allocation: legal entity, contact account, currency, account must match.

    Getting document allocations

    Allocations can be included while retrieving a document using the ?include=allocations query parameter.

    GET https://api.iplicit.com/api/payment/PAY1?include=allocations
    
    {
        "docNo": "PAY1",
        ...
        "allocations": [
            {
              "id": "9e49deb2-2f72-4a57-adc2-1e3a35821475",
              "docId": "5676e87a-77a0-4e7c-be6e-2d5299fe34f6",
              "docNo": "SIN1",
              "allocAmountCurrency": 145.17000,
              "allocAmountBase": 164.10000,
              "allocCurrencyRate": 0.8846290000
            }
      ]
    }
    

    Automatic allocation

    When creating a new payment or receipt you can provide "AllocateAuto": true to automatically allocate any outstanding invoice of the exact same amount that is still fully outstanding.

    POST https://api.iplicit.com/api/receipt

    {
        "docTypeId": "CREC",
        "contactAccountId": "10849",
        "bankAccountId": "DEMOGBP",
        "currencyAmount": 10.00
    }
    

    Manual allocation

    When creating a new document:

    Example

    POST https://api.iplicit.com/api/receipt

    {
        "docTypeId": "CREC",
        "contactAccountId": "10849",
        "bankAccountId": "DEMOGBP",
        "currencyAmount": 100.00,
        "allocations": [
            { "docId": "SIN1", "allocAmountCurrency": 75.00 },
            { "docId": "SIN2", "allocAmountCurrency": 25.00 }
        ]
    }
    

    For an existing document:

    POST: https://api.iplicit.com/api/receipt/REC0063/allocation

    {
        "docId": "SIN02290",  
        "allocAmountCurrency": 10.00
    }
    

    This allocates an amount of 10 in the currency of the receipt REC0063 to sale invoice SIN02290.

    For documents in a non-base currency the base amount can be provided as well:

    POST: https://api.iplicit.com/api/receipt/REC0063/allocation

    {
        "docId": "SIN02290",  
        "allocAmountCurrency": 10.00,
        "allocAmountBase": 8.59
    }
    

    This creates a partial allocation from REC0063 to SIN02290.

    Delete allocation

    Deleting a document allocation is done by DELETE.

    Example

    DELETE /api/document/{docRef}/allocations/{allocationId}
    

    The allocation is deleted, and outstanding amounts on the document are recalculated.

    Note: Not available for system allocations.

    In this article
    Back to top Generated by DocFX