NAV
bash javascript php python

Info

Welcome to the generated API reference. Get Postman Collection

Invoice

Show Invoice

Show an invoice for user by id.


Requires authentication

Example request:

curl -X GET \
    -G "https://intarium.ch/api/v1/invoices/asperiores" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {API Token}"
const url = new URL(
    "https://intarium.ch/api/v1/invoices/asperiores"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {API Token}",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://intarium.ch/api/v1/invoices/asperiores',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => 'Bearer {API Token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://intarium.ch/api/v1/invoices/asperiores'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {API Token}'
}
response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):

{
    "data": [
        {
            "id": 41,
            "user_id": 4,
            "company_id": null,
            "s_first_name": "Madeleine",
            "s_last_name": "Kunz",
            "s_company_name": "Näf Gisler GmbH",
            "s_street": "Bosshardweg",
            "s_strNo": "3",
            "s_strCo": null,
            "s_zip": "0728",
            "s_city": "Zofingen",
            "s_country": "PM",
            "s_phone": "066 021 10 96",
            "s_email": "marko.probst@example.com",
            "s_website": "kung.com",
            "s_vat_number": "91788611",
            "s_logo_path": "\/img\/Intarium_logo.png",
            "r_customer_id": "637",
            "r_first_name": "Simone",
            "r_last_name": "Blum",
            "r_company_name": "Niederberger",
            "r_street": "Hartmannstr.",
            "r_strNo": "6c",
            "r_strCo": null,
            "r_zip": "0769",
            "r_city": "Lugano",
            "r_country": "RU",
            "r_email": "kott@example.org",
            "p_name": "Intarium Forderungsmanagement GmbH",
            "p_street": "Freiestr.",
            "p_strNo": "27",
            "p_zip": "8610",
            "p_city": "Uster",
            "p_country": "CH",
            "p_phone": "+41 (0) 762110981",
            "p_email": "support@intarium.ch",
            "p_website": "www.intarium.ch",
            "p_vat_number": null,
            "p_logo_path": "\/img\/Intarium_logo.png",
            "p_account_holder": "Intarium Forderungsmanagement GmbH",
            "p_iban": "CH16 8080 8003 1156 4330 8",
            "p_swift": "RAIFCH22E71",
            "p_reference": "demo",
            "p_bank_name": "Raiffeisenbank Zürcher Oberland",
            "p_bank_country": "CH",
            "invoice_number": "125",
            "po_number": "23",
            "title": "Rechnung",
            "terms": "Labore est inventore neque magnam et eaque assumenda. Rem voluptatem voluptate asperiores mollitia nostrum est.",
            "footer": "Suscipit provident quo.",
            "public_notes": "Nostrum non qui aut ex voluptas rerum asperiores reprehenderit.",
            "private_notes": "Eius aut aliquid sit est. Natus magni voluptatum et magnam qui sit beatae nihil. Ea ipsam nisi est est at velit.",
            "start_date": "2019-09-19 00:00:00",
            "end_date": "2019-10-01 00:00:00",
            "invoice_date": "2019-09-11 00:00:00",
            "due_date": "2019-09-24 00:00:00",
            "subtotal": "39.02",
            "discount": null,
            "taxtotal": "45.76",
            "currency": "CHF",
            "status": "Entwurf",
            "deleted_at": null,
            "created_at": "2019-10-17 18:58:51",
            "updated_at": "2019-10-17 18:58:51",
            "totalCosts": 84.78,
            "downloadLink": "https:\/\/intarium.test\/konto\/rechnungen\/pdf-download\/wByVewvYAj",
            "paymentLink": "https:\/\/intarium.test\/r\/demo",
            "pReference": "demo",
            "pIban": "CH1680808003115643308",
            "originalPaymentStatus": "new"
        }
    ]
}

HTTP Request

GET api/v1/invoices/{id}

URL Parameters

Parameter Status Description
id required The ID of the user's invoice.

List Invoices

List user's invoices with pagination ordered by creation date.


Requires authentication

Example request:

curl -X GET \
    -G "https://intarium.ch/api/v1/invoices" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {API Token}"
const url = new URL(
    "https://intarium.ch/api/v1/invoices"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {API Token}",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://intarium.ch/api/v1/invoices',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => 'Bearer {API Token}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://intarium.ch/api/v1/invoices'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {API Token}'
}
response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):

{
    "data": [
        {
            "id": 41,
            "user_id": 4,
            "company_id": null,
            "s_first_name": "Madeleine",
            "s_last_name": "Kunz",
            "s_company_name": "Näf Gisler GmbH",
            "s_street": "Bosshardweg",
            "s_strNo": "3",
            "s_strCo": null,
            "s_zip": "0728",
            "s_city": "Zofingen",
            "s_country": "PM",
            "s_phone": "066 021 10 96",
            "s_email": "marko.probst@example.com",
            "s_website": "kung.com",
            "s_vat_number": "91788611",
            "s_logo_path": "\/img\/Intarium_logo.png",
            "r_customer_id": "637",
            "r_first_name": "Simone",
            "r_last_name": "Blum",
            "r_company_name": "Niederberger",
            "r_street": "Hartmannstr.",
            "r_strNo": "6c",
            "r_strCo": null,
            "r_zip": "0769",
            "r_city": "Lugano",
            "r_country": "RU",
            "r_email": "kott@example.org",
            "p_name": "Intarium Forderungsmanagement GmbH",
            "p_street": "Freiestr.",
            "p_strNo": "27",
            "p_zip": "8610",
            "p_city": "Uster",
            "p_country": "CH",
            "p_phone": "+41 (0) 762110981",
            "p_email": "support@intarium.ch",
            "p_website": "www.intarium.ch",
            "p_vat_number": null,
            "p_logo_path": "\/img\/Intarium_logo.png",
            "p_account_holder": "Intarium Forderungsmanagement GmbH",
            "p_iban": "CH16 8080 8003 1156 4330 8",
            "p_swift": "RAIFCH22E71",
            "p_reference": "demo",
            "p_bank_name": "Raiffeisenbank Zürcher Oberland",
            "p_bank_country": "CH",
            "invoice_number": "125",
            "po_number": "23",
            "title": "Rechnung",
            "terms": "Labore est inventore neque magnam et eaque assumenda. Rem voluptatem voluptate asperiores mollitia nostrum est.",
            "footer": "Suscipit provident quo.",
            "public_notes": "Nostrum non qui aut ex voluptas rerum asperiores reprehenderit.",
            "private_notes": "Eius aut aliquid sit est. Natus magni voluptatum et magnam qui sit beatae nihil. Ea ipsam nisi est est at velit.",
            "start_date": "2019-09-19 00:00:00",
            "end_date": "2019-10-01 00:00:00",
            "invoice_date": "2019-09-11 00:00:00",
            "due_date": "2019-09-24 00:00:00",
            "subtotal": "39.02",
            "discount": null,
            "taxtotal": "45.76",
            "currency": "CHF",
            "status": "Entwurf",
            "deleted_at": null,
            "created_at": "2019-10-17 18:58:51",
            "updated_at": "2019-10-17 18:58:51",
            "totalCosts": 84.78,
            "downloadLink": "https:\/\/intarium.test\/konto\/rechnungen\/pdf-download\/wByVewvYAj",
            "paymentLink": "https:\/\/intarium.test\/r\/demo",
            "pReference": "demo",
            "pIban": "CH1680808003115643308",
            "originalPaymentStatus": "new"
        }
    ],
    "links": {
        "first": "https:\/\/intarium.test\/api\/v1\/invoices?page=1",
        "last": "https:\/\/intarium.test\/api\/v1\/invoices?page=3",
        "prev": null,
        "next": "https:\/\/intarium.test\/api\/v1\/invoices?page=2"
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 3,
        "path": "https:\/\/intarium.test\/api\/v1\/invoices",
        "per_page": 10,
        "to": 10,
        "total": 21
    }
}

HTTP Request

GET api/v1/invoices

Create Invoice

Create an invoice for user and receive a bank address with reference code, payment link and invoice pdf file. The sender and provider details will be filled out automatically by the system depending on your personal settings and preferences.


Requires authentication

Example request:

curl -X POST \
    "https://intarium.ch/api/v1/invoices" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {API Token}" \
    -d '{"client":{"first_name":"'Madeleine'","last_name":"'Kunz'","company_name":"'Bitcoin AG'","street":"'Brunnenstr.'","strNo":"3","strCo":"null","zip":"'8610'","city":"'Uster'","country":"'CH'","email":"'madeleine.kunz@example.com'"},"invoice":{"invoice_number":"15","po_number":"23","invoice_date":"'2019-09-11 00:00:00'","due_date":"'2019-09-24 00:00:00'","currency":"'CHF'","subtotal":30,"taxtotal":3,"discount":1.5,"items":[{"key":"9","description":"'Service \/ Product'","cost":15,"qty":2,"vat":10}]},"status":"'draft' | 'sent' | 'marked_sent'"}'
const url = new URL(
    "https://intarium.ch/api/v1/invoices"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {API Token}",
};

let body = {
    "client": {
        "first_name": "'Madeleine'",
        "last_name": "'Kunz'",
        "company_name": "'Bitcoin AG'",
        "street": "'Brunnenstr.'",
        "strNo": "3",
        "strCo": "null",
        "zip": "'8610'",
        "city": "'Uster'",
        "country": "'CH'",
        "email": "'madeleine.kunz@example.com'"
    },
    "invoice": {
        "invoice_number": "15",
        "po_number": "23",
        "invoice_date": "'2019-09-11 00:00:00'",
        "due_date": "'2019-09-24 00:00:00'",
        "currency": "'CHF'",
        "subtotal": 30,
        "taxtotal": 3,
        "discount": 1.5,
        "items": [
            {
                "key": "9",
                "description": "'Service \/ Product'",
                "cost": 15,
                "qty": 2,
                "vat": 10
            }
        ]
    },
    "status": "'draft' | 'sent' | 'marked_sent'"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://intarium.ch/api/v1/invoices',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => 'Bearer {API Token}',
        ],
        'json' => [
            'client' => [
                'first_name' => '\'Madeleine\'',
                'last_name' => '\'Kunz\'',
                'company_name' => '\'Bitcoin AG\'',
                'street' => '\'Brunnenstr.\'',
                'strNo' => '3',
                'strCo' => 'null',
                'zip' => '\'8610\'',
                'city' => '\'Uster\'',
                'country' => '\'CH\'',
                'email' => '\'madeleine.kunz@example.com\'',
            ],
            'invoice' => [
                'invoice_number' => '15',
                'po_number' => '23',
                'invoice_date' => '\'2019-09-11 00:00:00\'',
                'due_date' => '\'2019-09-24 00:00:00\'',
                'currency' => '\'CHF\'',
                'subtotal' => 30.0,
                'taxtotal' => 3.0,
                'discount' => 1.5,
                'items' => [
                    [
                        'key' => '9',
                        'description' => '\'Service / Product\'',
                        'cost' => 15.0,
                        'qty' => 2,
                        'vat' => 10.0,
                    ],
                ],
            ],
            'status' => '\'draft\' | \'sent\' | \'marked_sent\'',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://intarium.ch/api/v1/invoices'
payload = {
    "client": {
        "first_name": "'Madeleine'",
        "last_name": "'Kunz'",
        "company_name": "'Bitcoin AG'",
        "street": "'Brunnenstr.'",
        "strNo": "3",
        "strCo": "null",
        "zip": "'8610'",
        "city": "'Uster'",
        "country": "'CH'",
        "email": "'madeleine.kunz@example.com'"
    },
    "invoice": {
        "invoice_number": "15",
        "po_number": "23",
        "invoice_date": "'2019-09-11 00:00:00'",
        "due_date": "'2019-09-24 00:00:00'",
        "currency": "'CHF'",
        "subtotal": 30,
        "taxtotal": 3,
        "discount": 1.5,
        "items": [
            {
                "key": "9",
                "description": "'Service \/ Product'",
                "cost": 15,
                "qty": 2,
                "vat": 10
            }
        ]
    },
    "status": "'draft' | 'sent' | 'marked_sent'"
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {API Token}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (200):

{
    "data": [
        {
            "id": 41,
            "user_id": 4,
            "company_id": null,
            "s_first_name": "Madeleine",
            "s_last_name": "Kunz",
            "s_company_name": "Näf Gisler GmbH",
            "s_street": "Bosshardweg",
            "s_strNo": "3",
            "s_strCo": null,
            "s_zip": "0728",
            "s_city": "Zofingen",
            "s_country": "PM",
            "s_phone": "066 021 10 96",
            "s_email": "marko.probst@example.com",
            "s_website": "kung.com",
            "s_vat_number": "91788611",
            "s_logo_path": "\/img\/Intarium_logo.png",
            "r_customer_id": "637",
            "r_first_name": "Simone",
            "r_last_name": "Blum",
            "r_company_name": "Niederberger",
            "r_street": "Hartmannstr.",
            "r_strNo": "6c",
            "r_strCo": null,
            "r_zip": "0769",
            "r_city": "Lugano",
            "r_country": "RU",
            "r_email": "kott@example.org",
            "p_name": "Intarium Forderungsmanagement GmbH",
            "p_street": "Freiestr.",
            "p_strNo": "27",
            "p_zip": "8610",
            "p_city": "Uster",
            "p_country": "CH",
            "p_phone": "+41 (0) 762110981",
            "p_email": "support@intarium.ch",
            "p_website": "www.intarium.ch",
            "p_vat_number": null,
            "p_logo_path": "\/img\/Intarium_logo.png",
            "p_account_holder": "Intarium Forderungsmanagement GmbH",
            "p_iban": "CH16 8080 8003 1156 4330 8",
            "p_swift": "RAIFCH22E71",
            "p_reference": "demo",
            "p_bank_name": "Raiffeisenbank Zürcher Oberland",
            "p_bank_country": "CH",
            "invoice_number": "125",
            "po_number": "23",
            "title": "Rechnung",
            "terms": "Labore est inventore neque magnam et eaque assumenda. Rem voluptatem voluptate asperiores mollitia nostrum est.",
            "footer": "Suscipit provident quo.",
            "public_notes": "Nostrum non qui aut ex voluptas rerum asperiores reprehenderit.",
            "private_notes": "Eius aut aliquid sit est. Natus magni voluptatum et magnam qui sit beatae nihil. Ea ipsam nisi est est at velit.",
            "start_date": "2019-09-19 00:00:00",
            "end_date": "2019-10-01 00:00:00",
            "invoice_date": "2019-09-11 00:00:00",
            "due_date": "2019-09-24 00:00:00",
            "subtotal": "39.02",
            "discount": null,
            "taxtotal": "45.76",
            "currency": "CHF",
            "status": "Entwurf",
            "deleted_at": null,
            "created_at": "2019-10-17 18:58:51",
            "updated_at": "2019-10-17 18:58:51",
            "totalCosts": 84.78,
            "downloadLink": "https:\/\/intarium.test\/konto\/rechnungen\/pdf-download\/wByVewvYAj",
            "paymentLink": "https:\/\/intarium.test\/r\/demo",
            "pReference": "demo",
            "pIban": "CH1680808003115643308",
            "originalPaymentStatus": "new"
        }
    ]
}

HTTP Request

POST api/v1/invoices

Body Parameters

Parameter Type Status Description
client.first_name string optional Recipient
client.last_name string optional Recipient
client.company_name string optional Recipient
client.street string optional Recipient
client.strNo string optional Recipient
client.strCo string optional Recipient
client.zip string optional Recipient
client.city string optional Recipient
client.country string optional Recipient
client.email string optional Recipient
invoice.invoice_number required optional string The id of your invoice.
invoice.po_number string optional The id of your product/service.
invoice.invoice_date string required The invoice date.
invoice.due_date string optional The due date.
invoice.currency string required The currency of the invoice.
status string required The status of the invoice (only draft is editable and deletable).
invoice.subtotal float required Total price of all invoice items together without vat.
invoice.taxtotal float optional Total vat of all invoice items together (vat only).
invoice.discount float optional Discount amount of invoice (will be subtracted).
invoice.items[].key string required Array of invoice items.
invoice.items[].description string required Array of invoice items.
invoice.items[].cost float required Array of invoice items.
invoice.items[].qty integer required Array of invoice items - quantity.
invoice.items[].vat float optional Array of invoice items - vat in percent.