Amili Docs
Home
Products
Products
  • Debt.collection
  • Account Receivable
  • Distribution
Go to amili.no
Home
Products
Products
  • Debt.collection
  • Account Receivable
  • Distribution
Go to amili.no
  1. Documents
  • Home
    • About
  • Debt.Collection
    • About
    • Collection API
      • CallBanqSoft
        • banqsoft
      • Batches
        • Get all batches
        • Get organization batches
        • Get batch by ID
      • Collections
        • Retrieve cases for an organization
      • Invoice
        • Create a new invoice
        • Get organization invoices
        • Get invoice by ID
        • Get invoice documents by invoice id
        • Get invoice history by invoice id
        • Get invoice payments by invoice id
        • Pause invoice
        • Withdraw invoice
        • Resume invoice
      • Payment
        • Create new payments
      • Api Status
        • Ping the server
        • Ping the server to check if authorized
        • Check the status of the API health
      • Organizations
        • Get reports on a organization
      • Settlement
        • Retrieve settlements from an organization
    • AutoCollect
      • Attachment
        • /webapi/api/Attachment
      • Batch
        • /webapi/api/Batch
        • /webapi/api/Batch
      • Ping
        • /webapi/api/Ping
  • Accounts Receivable
    • About
    • ARM API
      • Health
        • Check API health
      • ArItems
        • Get one AR item
        • Get a list of AR items
        • Put (update) ar item details
      • Documents
        • Get one document
          GET
        • POST (create) a batch of documents
          POST
        • POST (create) one document
          POST
        • Get a list of documents
          GET
      • AutoPostings
        • POST (create) one or more auto postings
      • GlItems
        • Get one GL item
        • Get a list of GL items
      • Customers
        • Get one customer
        • Delete a customer
        • POST (create) a batch of customers
        • PUT (update) a batch of customers
        • PUT (update) one customer
        • GET a list of customers
        • POST (create) one customer
      • Batches
        • Get one batch
      • PaymentReservations
        • Creates a new payment reservation
      • Files
        • POST (upload) one or more OS files
  • Distribution
    • About
    • Invoice API
      • send
        • Add a new B2B EHF/PEPPOL creditnote
        • Add a new B2B EHF/PEPPOL invoice
        • Add a new B2C invoice
        • Add a new B2C letter
        • Add a new B2C Swedish invoice
        • Add a new B2C Danish invoice
        • Check invoice status
        • Check invoice status
      • lookup
        • Get invoice lookup link
      • organization
        • Add a new company
        • Check company status
      • bankAgreement
        • Register new bank agreement
        • Check status of bank agreement
    • Partner API
      • Companies
        • Get available companies
      • Files
        • List all bundles/files within a specific period with FromDate/ToDate and CompanyId
        • Get a summary of all bundles/files within a specific period with FromDate/ToDate and CompanyId
        • List invoices based on filename
      • Invoice
        • Get a summary of all invoices within a specific period with FromDate/ToDate and CompanyId
      • Invoices
        • List invoices based on InvoiceNumber or specific DateTime (period)
      • InvoiceView
        • Look up invoice with TransactionRid and CompanyId
        • Look up invoice with InvoiceNumber and CompanyId
      • Receipt
        • Get receipt for invoice with TransactionRid and CompanyId
      • Token
        • Request a token.
  • Identity.Api
    • Identity
      • /token
      • /refresh
      • /verify
      • /health
Home
Products
Products
  • Debt.collection
  • Account Receivable
  • Distribution
Go to amili.no
Home
Products
Products
  • Debt.collection
  • Account Receivable
  • Distribution
Go to amili.no
  1. Documents

POST (create) one document

POST
/clients/{clientno}/documents
Create one document.
There are two ways to create new documents:
Use POST /clients/{clientno}/documents to create one new document; input one document object. The data will be validated and document created immediately and you will get a response describing the status and result. The new document is immediately active and ready to be posted etc. Or:
Use POST /clients/{clientno}/documents/batches to create a batch of new documents; input an array of document objects. The data will be stored, but not processed immediately. The output will present a batchUuid that you must keep track of. Processing is done asynchronously (later) and the bathcUuid can be used to retrieve the batch processing status and result using GET /clients/{clientno}/batches/{batchuuid}

Request

Authorization
JWT Bearer
Add the parameter
Authorization
to Headers
Example:
Authorization: ********************
or
Path Params

Body Params application/jsonRequired

Examples

Responses

🟢201Created
application/json
Document created
Headers

Body

🟠400Bad Request
🟠401Unauthorized
🟠403Forbidden
🟠404Not Found
🟠422Unprocessable Entity
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/clients//documents' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "metadata": {
        "userId": "TestUser"
    },
    "document": {
        "documentType": "IN",
        "customerNo": "543210",
        "documentNo": "88776655",
        "documentDate": "2025-02-27",
        "dueDate": "2025-03-11",
        "currency": "NOK",
        "language": "en",
        "kid": "500221850000200350786",
        "marketingMessageCode": "0203",
        "customerMessage": "Happy holidays!",
        "salesOrderId": "B-0564311",
        "purchaseOrderId": "",
        "sellerReference": "C333",
        "buyerReference": "A1982",
        "additionalReference": "X99887",
        "subCustomerNo": "654655",
        "ledgerNote": "This is a note for the AR ledger",
        "currencyAmounts": {
            "exclVat": 5200,
            "vat": 1300,
            "inclVat": 6500
        },
        "distribution": {
            "type": "M",
            "einvoiceCode": 0
        },
        "einvoiceAddress": {
            "address": "test@armresttest.no",
            "addressScheme": "",
            "operator": ""
        },
        "emailAddress": [
            "test@armresttest.no"
        ],
        "attachmentFiles": [],
        "attachmentCodes": [],
        "customCodes": [],
        "documentLines": [
            {
                "lineNo": 1,
                "lineType": "PLH",
                "articleNo": "1300",
                "articleName": "Comb",
                "lineText": "Red comb",
                "quantityUnit": "pcs",
                "quantity": 1,
                "volumeUnit": "",
                "volume": 0,
                "price": 200,
                "itemGroup1": "500",
                "itemGroup2": "",
                "itemGroup3": "",
                "currencyAmounts": {
                    "exclVat": 200,
                    "vat": 50,
                    "inclVat": 250
                }
            },
            {
                "lineNo": 2,
                "lineType": "PLH",
                "articleNo": "1500",
                "articleName": "Pill",
                "lineText": "Purple pill",
                "quantityUnit": "dozen",
                "quantity": 1,
                "volumeUnit": "",
                "volume": 0,
                "price": 5000,
                "itemGroup1": "600",
                "itemGroup2": "",
                "itemGroup3": "",
                "currencyAmounts": {
                    "exclVat": 5000,
                    "vat": 150,
                    "inclVat": 6250
                }
            },
            {
                "lineNo": 3,
                "lineType": "TXT",
                "articleNo": "",
                "articleName": "",
                "lineText": "This is a text line with no amounts",
                "quantityUnit": "",
                "quantity": 0,
                "volumeUnit": "",
                "volume": 0,
                "price": 0,
                "itemGroup1": "",
                "itemGroup2": "",
                "itemGroup3": "",
                "currencyAmounts": {
                    "exclVat": 0,
                    "vat": 0,
                    "inclVat": 0
                }
            }
        ]
    }
}'
Response Response Example
201 - Document created
{
    "status": "PROCESSED",
    "result": "CREATED",
    "message": "CREATED",
    "clientNo": 2218,
    "accountNo": 500002,
    "referenceNo": 35078,
    "documentBundleId": 432795,
    "customerNo": "543210",
    "documentNo": "88776655",
    "warnings": [
        {
            "field": "EmailAddressDocument",
            "message": "Email address owea@ testarmrest.no was sanitized: owea@testarmrest.no was s"
        }
    ]
}
Modified at 2025-09-29 16:08:55
Previous
POST (create) a batch of documents
Next
Get a list of documents
Built with