Tamio

Create an invoice

POST https://api.tamio.com/v2/orders/create

Creates a new one-time invoice with customer details, products, and payment configuration. Requires either payment method IDs or custom payment instructions.

Products can reference existing catalog products by id, product variants by variant, or be custom line items with name and price.

Body Parameters

customer object*
JSON
{ "customer": { "id": "00000000-0000-0000-0000-000000000000", "billing_address_id": "00000000-0000-0000-0000-000000000000", "shipping_address_id": "00000000-0000-0000-0000-000000000000" } }
id string*

Customer UUID

billing_address_id string

Billing address UUID (uses default if omitted)

shipping_address_id string

Shipping address UUID (uses default if omitted)

date object*

Invoice creation date (ISO format or Unix timestamp)

due_date object

Payment due date (ISO format or Unix timestamp)

label string

Invoice label/title

locale string

Language code for localization

currency string*

Three-letter ISO currency code

taxes string

Tax calculation method

accountoff
prefix string

Invoice number prefix (e.g., 'INV-')

invoice_number integer

Custom invoice number (auto-generated if omitted)

send_to_customer boolean

Send invoice to customer via email after creation

custom_payment string

Custom payment instructions (required when no payment methods)

payments array of string

Payment method IDs enabled for this invoice

fulfillment_options FulfillmentOptions
shipping object

Shipping information and cost

JSON
{ "shipping": { "label": "string", "cost": 0 } }
label string*

Shipping method name

cost integer*

Shipping cost in smallest currency unit

products array of InvoiceProduct*

Products or services to invoice

JSON
{ "products": [ { "id": "c3d4e5f6-a7b8-9012-cdef-123456789012", "variant": "d4e5f6a7-b8c9-0123-def0-234567890123", "name": "Premium Consultation", "price": 2500, "quantity": 2 } ] }
id string

Product UUID from catalog

variant string

Product variant UUID

name string

Custom product name (required if no id or variant)

price integer

Price in smallest currency unit (required if no id or variant)

quantity integer

Quantity

Responses

200 Invoice created successfully

Invoice created successfully

status integer
transaction object

Transaction object with invoice details

invoice string

UUID of the created invoice

400 Validation or business-logic error.
401 Missing or invalid API key
/orders/create
1const response = await fetch("https://api.tamio.com/v2/orders/create", {
2 method: "POST",
3 headers: {
4 "Authorization": "Bearer YOUR_API_KEY",
5 "Content-Type": "application/json"
6 },
7 body: JSON.stringify({
8 "customer": {
9 "id": "00000000-0000-0000-0000-000000000000",
10 "billing_address_id": "00000000-0000-0000-0000-000000000000",
11 "shipping_address_id": "00000000-0000-0000-0000-000000000000"
12 },
13 "date": null,
14 "due_date": null,
15 "label": "string",
16 "locale": "string",
17 "currency": "string",
18 "taxes": "account",
19 "prefix": "string",
20 "invoice_number": 0,
21 "send_to_customer": false,
22 "custom_payment": "string",
23 "payments": [],
24 "fulfillment_options": {
25 "stock": false,
26 "accounting_systems": false,
27 "merchant_emails": false,
28 "customer_emails": false,
29 "automations": false,
30 "shipping_providers": false
31 },
32 "shipping": {
33 "label": "string",
34 "cost": 0
35 },
36 "products": [
37 {
38 "id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
39 "variant": "d4e5f6a7-b8c9-0123-def0-234567890123",
40 "name": "Premium Consultation",
41 "price": 2500,
42 "quantity": 2
43 }
44 ]
45 })
46});
47const data = await response.json();
Responses
{
  "status": 200,
  "transaction": {},
  "invoice": "00000000-0000-0000-0000-000000000000"
}