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. Customers
  • Actions
    • POST (create) an action
      POST
    • POST (create) a reports action/generate a report
      POST
  • ArItems
    • GET a list of AR items
      GET
    • PUT (update) ar item details
      PUT
    • GET one AR item
      GET
  • AutoPostings
    • POST (create) one or more auto postings
      POST
  • Batches
    • GET one batch
      GET
  • ClientConfigs
    • GET a list of client config values
      GET
    • GET values for one client config key
      GET
  • Codes
    • GET ARM system code values
      GET
  • Customers
    • POST (create) one customer
      POST
    • PUT (update) one customer
      PUT
    • GET a list of customers
      GET
    • GET one customer
      GET
    • DELETE a customer
      DELETE
    • POST (create) a batch of customers
      POST
    • PUT (update) a batch of customers
      PUT
  • DocumentBundles
    • GET a list of document bundles
      GET
    • GET one document bundle
      GET
  • Documents
    • POST (create) one document
      POST
    • GET a list of documents
      GET
    • GET one document
      GET
    • POST (create) a batch of documents
      POST
  • Files
    • GET one or more OS files
    • POST (upload) one or more OS files
    • GET one OS file
  • GlItems
    • Get one GL item
    • GET a list of GL items
  • GlMovements
    • Get movement/balance for the latest closed GL year/period
    • GET a list of GL movements/balances
  • Insights
    • GET a list of ADB intervals
  • LogItems
    • GET one log item
    • GET a list of log items
  • PaymentReservations
    • POST (create) a new payment reservation
  • Health
    • Check API health
  1. Customers

POST (create) a batch of customers

POST
/clients/{clientno}/customers/batches
Creates a batch of new customers. If a customer already exists, it will be updated (same as PUT customer(s), see details under PUT (update) one customer).
There are two ways to create new customer(s):
Use POST /clients/{clientno}/customers to create one new customer; input one customer object. The data will be validated and customer created immediately. You will get a response describing the status and result. The new customer is immediately active and ready to be used. Or:
Use POST /clients/{clientno}/customers/batches to create a batch of new customers; input an array of customer 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

🟢202
application/json
Accepted for processing
Body

🟠400BadRequest
🟠403Forbidden
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/clients//customers/batches' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "metadata": {
        "userId": "TestUser"
    },
    "customers": [
        {
            "customerNo": "543210",
            "name": "Owe Armstrong",
            "postalAddress": {
                "addressLine1": "C/O ARMchair industries",
                "addressLine2": "707 Arm street",
                "addressLine3": "Appartment 8",
                "postalCode": "1234",
                "cityName": "Oslo",
                "countryText": "Norway"
            },
            "customerCategory": "CONS",
            "emailAddressDocument": [
                "owea@testarmrest.no"
            ],
            "secondaryEmailAddress": [
                "test2.email@testarmrest.no"
            ],
            "phoneNo": "99887766",
            "organizationNo": "984842252",
            "dateOfBirth": "1956-01-12",
            "distribution": {
                "type": "M",
                "einvoiceCode": 0
            },
            "sellerReference": "ARMref",
            "buyerReference": "OA"
        },
        {
            "customerNo": "765432",
            "name": "Bill Lossius",
            "postalAddress": {
                "addressLine1": "Farm alley 9",
                "addressLine2": "Birchwood neighborhood",
                "postalCode": "5432",
                "cityName": "Bergen",
                "countryCode": "NO"
            },
            "customerCategory": "CONS",
            "phoneNo": "98989898",
            "organizationNo": "987654321",
            "distribution": {
                "type": "M"
            },
            "buyerReference": "BL"
        }
    ]
}'
Response Response Example
202 - Batch accepted for treatment
{
    "status": "NOT-PROCESSED",
    "result": "PENDING",
    "message": "Document batch accepted for processing",
    "batchUuid": "8NlwdOIM1YLVFP9-WOwkYQ",
    "getResult": "https://api.staging.amili.no/arm/v1/clients/2218/batches/8NlwdOIM1YLVFP9-WOwkYQ"
}
Modified at 2026-04-14 09:49:15
Previous
DELETE a customer
Next
PUT (update) a batch of customers
Built with