Skip to main content
PATCH
/
v1
/
invoice-items
/
{id}
Create an invoice item
curl --request PATCH \
  --url https://api.wellapp.ai/v1/invoice-items/{id} \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '{
  "type": "invoice_item",
  "attributes": {
    "line_id": "1",
    "sku": "WM-1001",
    "name": "Wireless Mouse",
    "description": "Ergonomic wireless mouse with USB receiver",
    "unit_price": 25,
    "currency": "EUR",
    "unit": "EA",
    "min_quantity": 1,
    "max_quantity": 500,
    "tax": {
      "rate": 20,
      "category": "standard",
      "scheme": "VAT"
    },
    "period": {
      "start": "2025-06-26",
      "end": "2025-06-27"
    }
  },
  "relationships": {
    "invoices": {
      "data": [
        {
          "type": "invoice",
          "id": "invoice1"
        }
      ]
    }
  }
}'
{
  "data": {
    "type": "invoice_item",
    "id": "item_001",
    "attributes": {
      "line_id": "1",
      "sku": "WM-1001",
      "name": "Wireless Mouse",
      "description": "Ergonomic wireless mouse with USB receiver",
      "unit_price": 25,
      "currency": "EUR",
      "unit": "EA",
      "min_quantity": 1,
      "max_quantity": 500,
      "tax": {
        "rate": 20,
        "category": "standard",
        "scheme": "VAT"
      },
      "period": {
        "start": "2025-06-26",
        "end": "2025-06-27"
      },
      "created_at": "2025-05-11T13:42:12Z",
      "updated_at": "2025-05-11T13:45:20Z"
    },
    "relationships": {
      "invoices": {
        "data": [
          {
            "type": "invoice",
            "id": "invoice1"
          }
        ]
      },
      "medias": {
        "data": [
          {
            "type": "media",
            "id": "media-1"
          }
        ]
      }
    }
  },
  "included": [
    {
      "type": "invoice",
      "id": "invoice1",
      "attributes": {
        "reference_number": "INV-2025-001",
        "document_type": "commercial_invoice",
        "document_type_code": "380",
        "issue_date": "2025-01-15",
        "due_date": "2025-02-15",
        "local_currency": "EUR",
        "local_totals": {
          "subtotal": "1000.00",
          "tax_total": "200.00",
          "total_amount": "1200.00"
        },
        "terms": "Payment due within 30 days",
        "billing_context": "subscription",
        "payment_status": {
          "paid": false,
          "amount_paid": 0,
          "amount_remaining": 1200
        },
        "status": "draft",
        "description": "Professional services invoice for January 2025",
        "created_at": "2025-01-15T10:30:00Z",
        "updated_at": "2025-01-15T10:30:00Z"
      }
    },
    {
      "type": "media",
      "id": "media-1",
      "attributes": {
        "media_type": "logo",
        "is_primary": true,
        "url": "https://cdn.example.com/product-images/wireless-mouse.jpg",
        "created_at": "2025-05-11T13:00:00Z",
        "updated_at": "2025-05-11T13:00:00Z"
      }
    }
  ]
}

Headers

Authorization
string
required

Bearer token for authentication

Body

application/json

Request schema for creating invoice items

data
object

Response

Invoice item created successfully

Response schema for invoice items

type
string

Resource type identifier

Allowed value: "invoice_item"
id
string<uuid>

Unique identifier for the invoice item

attributes
object
relationships
object
I