API Documentation

API Endpoint

Line Items

Line Items

Supported filter params

  • invoice_id (array)
GET /api/v2/line_items
Requestsreturns line_items

GET  /api/v2/line_items

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": [
    {
      "id": "3",
      "type": "line_items",
      "attributes": {
        "unit_id": 2,
        "position": 1,
        "quantity": "3.0",
        "discount": null,
        "description": "test name",
        "adjustment": false,
        "currency": "EUR",
        "currency_default": "USD",
        "currency_normalized": "EUR",
        "unit_price": 5000,
        "unit_price_default": 6250,
        "unit_price_normalized": 5000,
        "amount": 15000,
        "amount_default": 18750,
        "amount_normalized": 15000
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 392
          }
        },
        "invoice": {
          "data": {
            "type": "invoices",
            "id": "41"
          }
        },
        "service": {
          "data": null
        },
        "expense": {
          "data": null
        },
        "service_type": {
          "data": {
            "type": "service_types",
            "id": "88"
          }
        }
      }
    }
  ],
  "included": [
    {
      "id": "41",
      "type": "invoices",
      "attributes": {
        "number": "2016/01",
        "subject": null,
        "invoiced_on": "2021-04-15",
        "sent_on": null,
        "pay_on": "2021-04-25",
        "delivery_on": null,
        "paid_on": null,
        "discount": null,
        "tax1_name": null,
        "tax1_value": null,
        "tax2_name": null,
        "tax2_value": null,
        "deleted_at": null,
        "tag_list": [],
        "note": null,
        "exported_at": null,
        "export_integration_type_id": null,
        "note_interpolated": null,
        "email_key": "75c0ff939a19018c24ef56e2dd69207a",
        "purchase_order_number": null,
        "export_invoice_url": null,
        "company_reference_id": null,
        "created_at": "2021-04-15T01:04:05.508+02:00",
        "exchange_rate": "1.25",
        "exchange_date": "2021-04-15",
        "custom_fields": null,
        "updated_at": "2021-04-15T01:04:05.524+02:00",
        "currency": "EUR",
        "currency_default": "USD",
        "currency_normalized": "EUR",
        "amount": 15000,
        "amount_default": 18750,
        "amount_normalized": 15000,
        "amount_tax": 0,
        "amount_tax_default": 0,
        "amount_tax_normalized": 0,
        "amount_with_tax": 15000,
        "amount_with_tax_default": 18750,
        "amount_with_tax_normalized": 15000,
        "amount_paid": 0,
        "amount_paid_default": 0,
        "amount_paid_normalized": 0,
        "amount_written_off": 0,
        "amount_written_off_default": 0,
        "amount_written_off_normalized": 0,
        "amount_unpaid": 15000,
        "amount_unpaid_default": 18750,
        "amount_unpaid_normalized": 15000
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 392
          }
        },
        "bill_to": {
          "data": null
        },
        "bill_from": {
          "data": null
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "1320"
          }
        },
        "document_type": {
          "data": null
        },
        "creator": {
          "data": {
            "type": "people",
            "id": "946"
          }
        },
        "subsidiary": {
          "data": null
        },
        "invoice_attributions": {
          "data": []
        },
        "attachment": {
          "data": null
        }
      }
    },
    {
      "id": "88",
      "type": "service_types",
      "attributes": {
        "name": "test name",
        "category_id": null,
        "archived_at": null,
        "description": "test description"
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 392
          }
        }
      }
    },
    {
      "id": "1320",
      "type": "companies",
      "attributes": {
        "name": "Client929",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2021-04-15T01:04:05.503+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 392
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "946",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user931@email.com",
        "title": null,
        "joined_at": "2021-04-15T01:04:05.000+02:00",
        "last_seen_at": "2021-04-15T01:04:05.538+02:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "user_id": 932,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2021-04-15T01:04:05.482+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0,
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 392
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "1319"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "1319",
      "type": "companies",
      "attributes": {
        "name": "Organization392",
        "billing_name": null,
        "vat": null,
        "default_currency": "USD",
        "created_at": "2021-04-15T01:04:05.481+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 392
          }
        },
        "bill_to": {
          "data": null
        }
      }
    }
  ],
  "links": {
    "first": "http://www.example.com/api/v2/line_items?page%5Bnumber%5D=1&page%5Bsize%5D=30",
    "last": "http://www.example.com/api/v2/line_items?page%5Bnumber%5D=1&page%5Bsize%5D=30"
  },
  "meta": {
    "current_page": 1,
    "total_pages": 1,
    "total_count": 1,
    "page_size": 30,
    "max_page_size": 200,
    "organization_features": {
      "custom_fields": {
        "type": "metered",
        "limit": 15,
        "used": 0
      },
      "custom_fields_per_project": {
        "type": "metered",
        "limit": 10,
        "used": 0
      },
      "public_custom_reports": {
        "type": "metered",
        "limit": 100,
        "used": 0
      },
      "private_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "scheduling_placeholders": {
        "type": "metered",
        "limit": 5,
        "used": 0
      },
      "multigrouping": {
        "type": "switch",
        "available": true
      },
      "client_access_to_budgets": {
        "type": "switch",
        "available": true
      },
      "subsidiaries": {
        "type": "switch",
        "available": true
      },
      "time_approvals": {
        "type": "switch",
        "available": true
      },
      "expenses_approvals": {
        "type": "switch",
        "available": true
      },
      "timeoff_approvals": {
        "type": "switch",
        "available": true
      },
      "autotracking": {
        "type": "switch",
        "available": true
      },
      "forecasting": {
        "type": "switch",
        "available": true
      },
      "webhooks": {
        "type": "switch",
        "available": true
      },
      "table_pivoting": {
        "type": "switch",
        "available": true
      },
      "formula_fields": {
        "type": "switch",
        "available": true
      },
      "single_sign_on": {
        "type": "switch",
        "available": true
      },
      "duplicate_tasks": {
        "type": "switch",
        "available": true
      },
      "billable_time_rounding": {
        "type": "switch",
        "available": true
      },
      "payment_sync": {
        "type": "switch",
        "available": true
      },
      "booking_methods": {
        "type": "switch",
        "available": true
      },
      "import_tasks_csv": {
        "type": "switch",
        "available": true
      },
      "reactions": {
        "type": "switch",
        "available": true
      },
      "time_week_view": {
        "type": "switch",
        "available": true
      },
      "subtasks": {
        "type": "switch",
        "available": true
      },
      "time_calendar_layout": {
        "type": "switch",
        "available": true
      },
      "theming": {
        "type": "switch",
        "available": true
      },
      "remove_branding": {
        "type": "switch",
        "available": true
      },
      "custom_invoicing_email": {
        "type": "switch",
        "available": true
      },
      "google_calendar_layout": {
        "type": "switch",
        "available": true
      },
      "pulse": {
        "type": "switch",
        "available": true
      }
    },
    "settings": {}
  }
}

Get line items
GET/api/v2/line_items


GET /api/v2/line_items/1
Requestsreturns line_item

GET  /api/v2/line_items/4

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "4",
    "type": "line_items",
    "attributes": {
      "unit_id": 2,
      "position": 1,
      "quantity": "3.0",
      "discount": null,
      "description": "test name",
      "adjustment": false,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "unit_price": 5000,
      "unit_price_default": 6250,
      "unit_price_normalized": 5000,
      "amount": 15000,
      "amount_default": 18750,
      "amount_normalized": 15000
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": 393
        }
      },
      "invoice": {
        "data": {
          "type": "invoices",
          "id": "42"
        }
      },
      "service": {
        "data": null
      },
      "expense": {
        "data": null
      },
      "service_type": {
        "data": {
          "type": "service_types",
          "id": "89"
        }
      }
    }
  },
  "included": [
    {
      "id": "42",
      "type": "invoices",
      "attributes": {
        "number": "2016/01",
        "subject": null,
        "invoiced_on": "2021-04-15",
        "sent_on": null,
        "pay_on": "2021-04-25",
        "delivery_on": null,
        "paid_on": null,
        "discount": null,
        "tax1_name": null,
        "tax1_value": null,
        "tax2_name": null,
        "tax2_value": null,
        "deleted_at": null,
        "tag_list": [],
        "note": null,
        "exported_at": null,
        "export_integration_type_id": null,
        "note_interpolated": null,
        "email_key": "ab47e7984f3fe8508017f5efd1a323fd",
        "purchase_order_number": null,
        "export_invoice_url": null,
        "company_reference_id": null,
        "created_at": "2021-04-15T01:04:05.643+02:00",
        "exchange_rate": "1.25",
        "exchange_date": "2021-04-15",
        "custom_fields": null,
        "updated_at": "2021-04-15T01:04:05.659+02:00",
        "currency": "EUR",
        "currency_default": "USD",
        "currency_normalized": "EUR",
        "amount": 15000,
        "amount_default": 18750,
        "amount_normalized": 15000,
        "amount_tax": 0,
        "amount_tax_default": 0,
        "amount_tax_normalized": 0,
        "amount_with_tax": 15000,
        "amount_with_tax_default": 18750,
        "amount_with_tax_normalized": 15000,
        "amount_paid": 0,
        "amount_paid_default": 0,
        "amount_paid_normalized": 0,
        "amount_written_off": 0,
        "amount_written_off_default": 0,
        "amount_written_off_normalized": 0,
        "amount_unpaid": 15000,
        "amount_unpaid_default": 18750,
        "amount_unpaid_normalized": 15000
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 393
          }
        },
        "bill_to": {
          "data": null
        },
        "bill_from": {
          "data": null
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "1322"
          }
        },
        "document_type": {
          "data": null
        },
        "creator": {
          "data": {
            "type": "people",
            "id": "947"
          }
        },
        "subsidiary": {
          "data": null
        },
        "invoice_attributions": {
          "data": []
        },
        "attachment": {
          "data": null
        }
      }
    },
    {
      "id": "89",
      "type": "service_types",
      "attributes": {
        "name": "test name",
        "category_id": null,
        "archived_at": null,
        "description": "test description"
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 393
          }
        }
      }
    },
    {
      "id": "1322",
      "type": "companies",
      "attributes": {
        "name": "Client930",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2021-04-15T01:04:05.638+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 393
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "947",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user932@email.com",
        "title": null,
        "joined_at": "2021-04-15T01:04:05.000+02:00",
        "last_seen_at": "2021-04-15T01:04:05.671+02:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "user_id": 933,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2021-04-15T01:04:05.617+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0,
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 393
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "1321"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "1321",
      "type": "companies",
      "attributes": {
        "name": "Organization393",
        "billing_name": null,
        "vat": null,
        "default_currency": "USD",
        "created_at": "2021-04-15T01:04:05.616+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 393
          }
        },
        "bill_to": {
          "data": null
        }
      }
    }
  ],
  "meta": {
    "organization_features": {
      "custom_fields": {
        "type": "metered",
        "limit": 15,
        "used": 0
      },
      "custom_fields_per_project": {
        "type": "metered",
        "limit": 10,
        "used": 0
      },
      "public_custom_reports": {
        "type": "metered",
        "limit": 100,
        "used": 0
      },
      "private_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "scheduling_placeholders": {
        "type": "metered",
        "limit": 5,
        "used": 0
      },
      "multigrouping": {
        "type": "switch",
        "available": true
      },
      "client_access_to_budgets": {
        "type": "switch",
        "available": true
      },
      "subsidiaries": {
        "type": "switch",
        "available": true
      },
      "time_approvals": {
        "type": "switch",
        "available": true
      },
      "expenses_approvals": {
        "type": "switch",
        "available": true
      },
      "timeoff_approvals": {
        "type": "switch",
        "available": true
      },
      "autotracking": {
        "type": "switch",
        "available": true
      },
      "forecasting": {
        "type": "switch",
        "available": true
      },
      "webhooks": {
        "type": "switch",
        "available": true
      },
      "table_pivoting": {
        "type": "switch",
        "available": true
      },
      "formula_fields": {
        "type": "switch",
        "available": true
      },
      "single_sign_on": {
        "type": "switch",
        "available": true
      },
      "duplicate_tasks": {
        "type": "switch",
        "available": true
      },
      "billable_time_rounding": {
        "type": "switch",
        "available": true
      },
      "payment_sync": {
        "type": "switch",
        "available": true
      },
      "booking_methods": {
        "type": "switch",
        "available": true
      },
      "import_tasks_csv": {
        "type": "switch",
        "available": true
      },
      "reactions": {
        "type": "switch",
        "available": true
      },
      "time_week_view": {
        "type": "switch",
        "available": true
      },
      "subtasks": {
        "type": "switch",
        "available": true
      },
      "time_calendar_layout": {
        "type": "switch",
        "available": true
      },
      "theming": {
        "type": "switch",
        "available": true
      },
      "remove_branding": {
        "type": "switch",
        "available": true
      },
      "custom_invoicing_email": {
        "type": "switch",
        "available": true
      },
      "google_calendar_layout": {
        "type": "switch",
        "available": true
      },
      "pulse": {
        "type": "switch",
        "available": true
      }
    },
    "settings": {}
  }
}

Gets a line item
GET/api/v2/line_items/{id}

URI Parameters
HideShow
id
number (required) Example: 1

line item id


POST /api/v2/line_items
Requestscreates line_itemreturns error

POST  /api/v2/line_items

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "line_items",
    "attributes": {
      "unit_id": 2,
      "unit_price": 5000,
      "quantity": 3,
      "description": "test name",
      "service_type_id": 90,
      "position": 1
    },
    "relationships": {
      "invoice": {
        "data": {
          "type": "invoices",
          "id": "43"
        }
      }
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "6",
    "type": "line_items",
    "attributes": {
      "unit_id": 2,
      "position": 1,
      "quantity": "3.0",
      "discount": null,
      "description": "test name",
      "adjustment": false,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "unit_price": 5000,
      "unit_price_default": 6250,
      "unit_price_normalized": 5000,
      "amount": 15000,
      "amount_default": 18750,
      "amount_normalized": 15000
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": 394
        }
      },
      "invoice": {
        "data": {
          "type": "invoices",
          "id": "43"
        }
      },
      "service": {
        "data": null
      },
      "expense": {
        "data": null
      },
      "service_type": {
        "data": {
          "type": "service_types",
          "id": "90"
        }
      }
    }
  },
  "included": [
    {
      "id": "43",
      "type": "invoices",
      "attributes": {
        "number": "2016/01",
        "subject": null,
        "invoiced_on": "2021-04-15",
        "sent_on": null,
        "pay_on": "2021-04-25",
        "delivery_on": null,
        "paid_on": null,
        "discount": null,
        "tax1_name": null,
        "tax1_value": null,
        "tax2_name": null,
        "tax2_value": null,
        "deleted_at": null,
        "tag_list": [],
        "note": null,
        "exported_at": null,
        "export_integration_type_id": null,
        "note_interpolated": null,
        "email_key": "0d755c2589a9eedde25f458d7005d1f2",
        "purchase_order_number": null,
        "export_invoice_url": null,
        "company_reference_id": null,
        "created_at": "2021-04-15T01:04:05.779+02:00",
        "exchange_rate": "1.25",
        "exchange_date": "2021-04-15",
        "custom_fields": null,
        "updated_at": "2021-04-15T01:04:05.842+02:00",
        "currency": "EUR",
        "currency_default": "USD",
        "currency_normalized": "EUR",
        "amount": 30000,
        "amount_default": 37500,
        "amount_normalized": 30000,
        "amount_tax": 0,
        "amount_tax_default": 0,
        "amount_tax_normalized": 0,
        "amount_with_tax": 30000,
        "amount_with_tax_default": 37500,
        "amount_with_tax_normalized": 30000,
        "amount_paid": 0,
        "amount_paid_default": 0,
        "amount_paid_normalized": 0,
        "amount_written_off": 0,
        "amount_written_off_default": 0,
        "amount_written_off_normalized": 0,
        "amount_unpaid": 30000,
        "amount_unpaid_default": 37500,
        "amount_unpaid_normalized": 30000
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 394
          }
        },
        "bill_to": {
          "data": null
        },
        "bill_from": {
          "data": null
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "1324"
          }
        },
        "document_type": {
          "data": null
        },
        "creator": {
          "data": {
            "type": "people",
            "id": "948"
          }
        },
        "subsidiary": {
          "data": null
        },
        "invoice_attributions": {
          "data": []
        },
        "attachment": {
          "data": null
        }
      }
    },
    {
      "id": "90",
      "type": "service_types",
      "attributes": {
        "name": "test name",
        "category_id": null,
        "archived_at": null,
        "description": "test description"
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 394
          }
        }
      }
    },
    {
      "id": "1324",
      "type": "companies",
      "attributes": {
        "name": "Client931",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2021-04-15T01:04:05.774+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 394
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "948",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user933@email.com",
        "title": null,
        "joined_at": "2021-04-15T01:04:05.000+02:00",
        "last_seen_at": "2021-04-15T01:04:05.824+02:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "user_id": 934,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2021-04-15T01:04:05.752+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0,
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 394
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "1323"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "1323",
      "type": "companies",
      "attributes": {
        "name": "Organization394",
        "billing_name": null,
        "vat": null,
        "default_currency": "USD",
        "created_at": "2021-04-15T01:04:05.751+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 394
          }
        },
        "bill_to": {
          "data": null
        }
      }
    }
  ],
  "meta": {
    "organization_features": {
      "custom_fields": {
        "type": "metered",
        "limit": 15,
        "used": 0
      },
      "custom_fields_per_project": {
        "type": "metered",
        "limit": 10,
        "used": 0
      },
      "public_custom_reports": {
        "type": "metered",
        "limit": 100,
        "used": 0
      },
      "private_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "scheduling_placeholders": {
        "type": "metered",
        "limit": 5,
        "used": 0
      },
      "multigrouping": {
        "type": "switch",
        "available": true
      },
      "client_access_to_budgets": {
        "type": "switch",
        "available": true
      },
      "subsidiaries": {
        "type": "switch",
        "available": true
      },
      "time_approvals": {
        "type": "switch",
        "available": true
      },
      "expenses_approvals": {
        "type": "switch",
        "available": true
      },
      "timeoff_approvals": {
        "type": "switch",
        "available": true
      },
      "autotracking": {
        "type": "switch",
        "available": true
      },
      "forecasting": {
        "type": "switch",
        "available": true
      },
      "webhooks": {
        "type": "switch",
        "available": true
      },
      "table_pivoting": {
        "type": "switch",
        "available": true
      },
      "formula_fields": {
        "type": "switch",
        "available": true
      },
      "single_sign_on": {
        "type": "switch",
        "available": true
      },
      "duplicate_tasks": {
        "type": "switch",
        "available": true
      },
      "billable_time_rounding": {
        "type": "switch",
        "available": true
      },
      "payment_sync": {
        "type": "switch",
        "available": true
      },
      "booking_methods": {
        "type": "switch",
        "available": true
      },
      "import_tasks_csv": {
        "type": "switch",
        "available": true
      },
      "reactions": {
        "type": "switch",
        "available": true
      },
      "time_week_view": {
        "type": "switch",
        "available": true
      },
      "subtasks": {
        "type": "switch",
        "available": true
      },
      "time_calendar_layout": {
        "type": "switch",
        "available": true
      },
      "theming": {
        "type": "switch",
        "available": true
      },
      "remove_branding": {
        "type": "switch",
        "available": true
      },
      "custom_invoicing_email": {
        "type": "switch",
        "available": true
      },
      "google_calendar_layout": {
        "type": "switch",
        "available": true
      },
      "pulse": {
        "type": "switch",
        "available": true
      }
    },
    "settings": {}
  }
}

POST  /api/v2/line_items

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "line_items",
    "attributes": {
      "unit_id": ""
    }
  }
}
Responses422
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/invoice"
      }
    },
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/unit_id"
      }
    },
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/unit_price"
      }
    },
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/quantity"
      }
    },
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "is not a number",
      "source": {
        "pointer": "data/attributes/quantity"
      }
    },
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/description"
      }
    }
  ]
}

Create a line item
POST/api/v2/line_items

URI Parameters
HideShow
invoice_id
number (required) Example: 1

invoice id

unit_id
number (required) Example: 1

unit id

unit_price
number (required) Example: 100

unit price

quantity
number (required) Example: 10

quantity

description
string (required) Example: Description

description


PATCH /api/v2/line_items/1
Requestsupdates line_itemreturns error

PATCH  /api/v2/line_items/9

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "line_items",
    "attributes": {
      "quantity": 6
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "9",
    "type": "line_items",
    "attributes": {
      "unit_id": 2,
      "position": 1,
      "quantity": "6.0",
      "discount": null,
      "description": "test name",
      "adjustment": false,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "unit_price": 5000,
      "unit_price_default": 6250,
      "unit_price_normalized": 5000,
      "amount": 30000,
      "amount_default": 37500,
      "amount_normalized": 30000
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": 397
        }
      },
      "invoice": {
        "data": {
          "type": "invoices",
          "id": "46"
        }
      },
      "service": {
        "data": null
      },
      "expense": {
        "data": null
      },
      "service_type": {
        "data": {
          "type": "service_types",
          "id": "93"
        }
      }
    }
  },
  "included": [
    {
      "id": "46",
      "type": "invoices",
      "attributes": {
        "number": "2016/01",
        "subject": null,
        "invoiced_on": "2021-04-15",
        "sent_on": null,
        "pay_on": "2021-04-25",
        "delivery_on": null,
        "paid_on": null,
        "discount": null,
        "tax1_name": null,
        "tax1_value": null,
        "tax2_name": null,
        "tax2_value": null,
        "deleted_at": null,
        "tag_list": [],
        "note": null,
        "exported_at": null,
        "export_integration_type_id": null,
        "note_interpolated": null,
        "email_key": "8f744dcd04d56d4fe4b9ff4674b994df",
        "purchase_order_number": null,
        "export_invoice_url": null,
        "company_reference_id": null,
        "created_at": "2021-04-15T01:04:06.141+02:00",
        "exchange_rate": "1.25",
        "exchange_date": "2021-04-15",
        "custom_fields": null,
        "updated_at": "2021-04-15T01:04:06.184+02:00",
        "currency": "EUR",
        "currency_default": "USD",
        "currency_normalized": "EUR",
        "amount": 30000,
        "amount_default": 37500,
        "amount_normalized": 30000,
        "amount_tax": 0,
        "amount_tax_default": 0,
        "amount_tax_normalized": 0,
        "amount_with_tax": 30000,
        "amount_with_tax_default": 37500,
        "amount_with_tax_normalized": 30000,
        "amount_paid": 0,
        "amount_paid_default": 0,
        "amount_paid_normalized": 0,
        "amount_written_off": 0,
        "amount_written_off_default": 0,
        "amount_written_off_normalized": 0,
        "amount_unpaid": 30000,
        "amount_unpaid_default": 37500,
        "amount_unpaid_normalized": 30000
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 397
          }
        },
        "bill_to": {
          "data": null
        },
        "bill_from": {
          "data": null
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "1330"
          }
        },
        "document_type": {
          "data": null
        },
        "creator": {
          "data": {
            "type": "people",
            "id": "951"
          }
        },
        "subsidiary": {
          "data": null
        },
        "invoice_attributions": {
          "data": []
        },
        "attachment": {
          "data": null
        }
      }
    },
    {
      "id": "93",
      "type": "service_types",
      "attributes": {
        "name": "test name",
        "category_id": null,
        "archived_at": null,
        "description": "test description"
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 397
          }
        }
      }
    },
    {
      "id": "1330",
      "type": "companies",
      "attributes": {
        "name": "Client934",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2021-04-15T01:04:06.136+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 397
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "951",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user936@email.com",
        "title": null,
        "joined_at": "2021-04-15T01:04:06.000+02:00",
        "last_seen_at": "2021-04-15T01:04:06.169+02:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "user_id": 937,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2021-04-15T01:04:06.115+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0,
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 397
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "1329"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "1329",
      "type": "companies",
      "attributes": {
        "name": "Organization397",
        "billing_name": null,
        "vat": null,
        "default_currency": "USD",
        "created_at": "2021-04-15T01:04:06.113+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 397
          }
        },
        "bill_to": {
          "data": null
        }
      }
    }
  ],
  "meta": {
    "organization_features": {
      "custom_fields": {
        "type": "metered",
        "limit": 15,
        "used": 0
      },
      "custom_fields_per_project": {
        "type": "metered",
        "limit": 10,
        "used": 0
      },
      "public_custom_reports": {
        "type": "metered",
        "limit": 100,
        "used": 0
      },
      "private_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "scheduling_placeholders": {
        "type": "metered",
        "limit": 5,
        "used": 0
      },
      "multigrouping": {
        "type": "switch",
        "available": true
      },
      "client_access_to_budgets": {
        "type": "switch",
        "available": true
      },
      "subsidiaries": {
        "type": "switch",
        "available": true
      },
      "time_approvals": {
        "type": "switch",
        "available": true
      },
      "expenses_approvals": {
        "type": "switch",
        "available": true
      },
      "timeoff_approvals": {
        "type": "switch",
        "available": true
      },
      "autotracking": {
        "type": "switch",
        "available": true
      },
      "forecasting": {
        "type": "switch",
        "available": true
      },
      "webhooks": {
        "type": "switch",
        "available": true
      },
      "table_pivoting": {
        "type": "switch",
        "available": true
      },
      "formula_fields": {
        "type": "switch",
        "available": true
      },
      "single_sign_on": {
        "type": "switch",
        "available": true
      },
      "duplicate_tasks": {
        "type": "switch",
        "available": true
      },
      "billable_time_rounding": {
        "type": "switch",
        "available": true
      },
      "payment_sync": {
        "type": "switch",
        "available": true
      },
      "booking_methods": {
        "type": "switch",
        "available": true
      },
      "import_tasks_csv": {
        "type": "switch",
        "available": true
      },
      "reactions": {
        "type": "switch",
        "available": true
      },
      "time_week_view": {
        "type": "switch",
        "available": true
      },
      "subtasks": {
        "type": "switch",
        "available": true
      },
      "time_calendar_layout": {
        "type": "switch",
        "available": true
      },
      "theming": {
        "type": "switch",
        "available": true
      },
      "remove_branding": {
        "type": "switch",
        "available": true
      },
      "custom_invoicing_email": {
        "type": "switch",
        "available": true
      },
      "google_calendar_layout": {
        "type": "switch",
        "available": true
      },
      "pulse": {
        "type": "switch",
        "available": true
      }
    },
    "settings": {}
  }
}

PATCH  /api/v2/line_items/10

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "line_items",
    "attributes": {
      "quantity": ""
    }
  }
}
Responses422
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/quantity"
      }
    },
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "is not a number",
      "source": {
        "pointer": "data/attributes/quantity"
      }
    }
  ]
}

Update a line item
PATCH/api/v2/line_items/{id}

URI Parameters
HideShow
id
number (required) Example: 1

line item id


DELETE /api/v2/line_items/1
Requestsarchives line item

DELETE  /api/v2/line_items/15

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Responses204
This response has no content.

Deletes a line item
DELETE/api/v2/line_items/{id}

URI Parameters
HideShow
id
number (required) Example: 1

line item id


Generated by aglio on 14 Apr 2021