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": 423
          }
        },
        "invoice": {
          "data": {
            "type": "invoices",
            "id": "44"
          }
        },
        "service": {
          "data": null
        },
        "expense": {
          "data": null
        },
        "service_type": {
          "data": {
            "type": "service_types",
            "id": "89"
          }
        }
      }
    }
  ],
  "included": [
    {
      "id": "44",
      "type": "invoices",
      "attributes": {
        "number": "2016/01",
        "subject": null,
        "invoiced_on": "2021-09-21",
        "sent_on": null,
        "pay_on": "2021-10-01",
        "delivery_on": null,
        "paid_on": null,
        "finalized_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": "0bf3f9499d16ad73e025ebe08ce9bf8c",
        "purchase_order_number": null,
        "export_invoice_url": null,
        "company_reference_id": null,
        "created_at": "2021-09-21T01:05:15.735+02:00",
        "exchange_rate": "1.25",
        "exchange_date": "2021-09-21",
        "custom_fields": null,
        "updated_at": "2021-09-21T01:05:15.752+02:00",
        "sample_data": false,
        "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": 423
          }
        },
        "bill_to": {
          "data": null
        },
        "bill_from": {
          "data": null
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "1398"
          }
        },
        "document_type": {
          "data": null
        },
        "creator": {
          "data": {
            "type": "people",
            "id": "1012"
          }
        },
        "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": 423
          }
        }
      }
    },
    {
      "id": "1398",
      "type": "companies",
      "attributes": {
        "name": "Client976",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2021-09-21T01:05:15.731+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {},
        "sample_data": false
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 423
          }
        }
      }
    },
    {
      "id": "1012",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user997@email.com",
        "title": null,
        "joined_at": "2021-09-21T01:05:15.000+02:00",
        "last_seen_at": "2021-09-21T01:05:15.765+02:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "setting_role_id": null,
        "invited_at": null,
        "is_user": true,
        "user_id": 998,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2021-09-21T01:05:15.705+02:00",
        "placeholder": false,
        "color_id": null,
        "contact": {},
        "sample_data": false
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 423
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "1397"
          }
        },
        "subsidiary": {
          "data": null
        },
        "holiday_calendar": {
          "data": null
        }
      }
    },
    {
      "id": "1397",
      "type": "companies",
      "attributes": {
        "name": "Organization423",
        "billing_name": null,
        "vat": null,
        "default_currency": "USD",
        "created_at": "2021-09-21T01:05:15.704+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {},
        "sample_data": false
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 423
          }
        }
      }
    }
  ],
  "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
      },
      "custom_fields_per_project": {
        "type": "metered",
        "limit": 10
      },
      "public_custom_reports": {
        "type": "metered",
        "limit": 100
      },
      "private_custom_reports": {
        "type": "metered",
        "limit": 30
      },
      "public_project_reports": {
        "type": "metered",
        "limit": 30
      },
      "private_project_reports": {
        "type": "metered",
        "limit": 10
      },
      "scheduling_placeholders": {
        "type": "metered",
        "limit": 5
      },
      "recycle_bin": {
        "type": "restricted",
        "available": true,
        "limit": 180
      },
      "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
      },
      "slack": {
        "type": "switch",
        "available": true
      },
      "task_custom_fields_library": {
        "type": "switch",
        "available": true
      },
      "timeline_layout": {
        "type": "switch",
        "available": true
      },
      "comment_visibility": {
        "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": 424
        }
      },
      "invoice": {
        "data": {
          "type": "invoices",
          "id": "45"
        }
      },
      "service": {
        "data": null
      },
      "expense": {
        "data": null
      },
      "service_type": {
        "data": {
          "type": "service_types",
          "id": "90"
        }
      }
    }
  },
  "included": [
    {
      "id": "45",
      "type": "invoices",
      "attributes": {
        "number": "2016/01",
        "subject": null,
        "invoiced_on": "2021-09-21",
        "sent_on": null,
        "pay_on": "2021-10-01",
        "delivery_on": null,
        "paid_on": null,
        "finalized_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": "b4112c18cee6037394c491909d0081ff",
        "purchase_order_number": null,
        "export_invoice_url": null,
        "company_reference_id": null,
        "created_at": "2021-09-21T01:05:15.871+02:00",
        "exchange_rate": "1.25",
        "exchange_date": "2021-09-21",
        "custom_fields": null,
        "updated_at": "2021-09-21T01:05:15.888+02:00",
        "sample_data": false,
        "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": 424
          }
        },
        "bill_to": {
          "data": null
        },
        "bill_from": {
          "data": null
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "1400"
          }
        },
        "document_type": {
          "data": null
        },
        "creator": {
          "data": {
            "type": "people",
            "id": "1013"
          }
        },
        "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": 424
          }
        }
      }
    },
    {
      "id": "1400",
      "type": "companies",
      "attributes": {
        "name": "Client977",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2021-09-21T01:05:15.866+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {},
        "sample_data": false
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 424
          }
        }
      }
    },
    {
      "id": "1013",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user998@email.com",
        "title": null,
        "joined_at": "2021-09-21T01:05:15.000+02:00",
        "last_seen_at": "2021-09-21T01:05:15.900+02:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "setting_role_id": null,
        "invited_at": null,
        "is_user": true,
        "user_id": 999,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2021-09-21T01:05:15.843+02:00",
        "placeholder": false,
        "color_id": null,
        "contact": {},
        "sample_data": false
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 424
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "1399"
          }
        },
        "subsidiary": {
          "data": null
        },
        "holiday_calendar": {
          "data": null
        }
      }
    },
    {
      "id": "1399",
      "type": "companies",
      "attributes": {
        "name": "Organization424",
        "billing_name": null,
        "vat": null,
        "default_currency": "USD",
        "created_at": "2021-09-21T01:05:15.842+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {},
        "sample_data": false
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 424
          }
        }
      }
    }
  ],
  "meta": {
    "organization_features": {
      "custom_fields": {
        "type": "metered",
        "limit": 15
      },
      "custom_fields_per_project": {
        "type": "metered",
        "limit": 10
      },
      "public_custom_reports": {
        "type": "metered",
        "limit": 100
      },
      "private_custom_reports": {
        "type": "metered",
        "limit": 30
      },
      "public_project_reports": {
        "type": "metered",
        "limit": 30
      },
      "private_project_reports": {
        "type": "metered",
        "limit": 10
      },
      "scheduling_placeholders": {
        "type": "metered",
        "limit": 5
      },
      "recycle_bin": {
        "type": "restricted",
        "available": true,
        "limit": 180
      },
      "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
      },
      "slack": {
        "type": "switch",
        "available": true
      },
      "task_custom_fields_library": {
        "type": "switch",
        "available": true
      },
      "timeline_layout": {
        "type": "switch",
        "available": true
      },
      "comment_visibility": {
        "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": 91,
      "position": 1
    },
    "relationships": {
      "invoice": {
        "data": {
          "type": "invoices",
          "id": "46"
        }
      }
    }
  }
}
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": 425
        }
      },
      "invoice": {
        "data": {
          "type": "invoices",
          "id": "46"
        }
      },
      "service": {
        "data": null
      },
      "expense": {
        "data": null
      },
      "service_type": {
        "data": {
          "type": "service_types",
          "id": "91"
        }
      }
    }
  },
  "included": [
    {
      "id": "46",
      "type": "invoices",
      "attributes": {
        "number": "2016/01",
        "subject": null,
        "invoiced_on": "2021-09-21",
        "sent_on": null,
        "pay_on": "2021-10-01",
        "delivery_on": null,
        "paid_on": null,
        "finalized_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": "8c52af2699c5863b00381fe1e43105be",
        "purchase_order_number": null,
        "export_invoice_url": null,
        "company_reference_id": null,
        "created_at": "2021-09-21T01:05:16.008+02:00",
        "exchange_rate": "1.25",
        "exchange_date": "2021-09-21",
        "custom_fields": null,
        "updated_at": "2021-09-21T01:05:16.062+02:00",
        "sample_data": false,
        "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": 425
          }
        },
        "bill_to": {
          "data": null
        },
        "bill_from": {
          "data": null
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "1402"
          }
        },
        "document_type": {
          "data": null
        },
        "creator": {
          "data": {
            "type": "people",
            "id": "1014"
          }
        },
        "subsidiary": {
          "data": null
        },
        "invoice_attributions": {
          "data": []
        },
        "attachment": {
          "data": null
        }
      }
    },
    {
      "id": "91",
      "type": "service_types",
      "attributes": {
        "name": "test name",
        "category_id": null,
        "archived_at": null,
        "description": "test description"
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 425
          }
        }
      }
    },
    {
      "id": "1402",
      "type": "companies",
      "attributes": {
        "name": "Client978",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2021-09-21T01:05:16.003+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {},
        "sample_data": false
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 425
          }
        }
      }
    },
    {
      "id": "1014",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user999@email.com",
        "title": null,
        "joined_at": "2021-09-21T01:05:16.000+02:00",
        "last_seen_at": "2021-09-21T01:05:16.042+02:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "setting_role_id": null,
        "invited_at": null,
        "is_user": true,
        "user_id": 1000,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2021-09-21T01:05:15.980+02:00",
        "placeholder": false,
        "color_id": null,
        "contact": {},
        "sample_data": false
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 425
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "1401"
          }
        },
        "subsidiary": {
          "data": null
        },
        "holiday_calendar": {
          "data": null
        }
      }
    },
    {
      "id": "1401",
      "type": "companies",
      "attributes": {
        "name": "Organization425",
        "billing_name": null,
        "vat": null,
        "default_currency": "USD",
        "created_at": "2021-09-21T01:05:15.978+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {},
        "sample_data": false
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 425
          }
        }
      }
    }
  ],
  "meta": {
    "organization_features": {
      "custom_fields": {
        "type": "metered",
        "limit": 15
      },
      "custom_fields_per_project": {
        "type": "metered",
        "limit": 10
      },
      "public_custom_reports": {
        "type": "metered",
        "limit": 100
      },
      "private_custom_reports": {
        "type": "metered",
        "limit": 30
      },
      "public_project_reports": {
        "type": "metered",
        "limit": 30
      },
      "private_project_reports": {
        "type": "metered",
        "limit": 10
      },
      "scheduling_placeholders": {
        "type": "metered",
        "limit": 5
      },
      "recycle_bin": {
        "type": "restricted",
        "available": true,
        "limit": 180
      },
      "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
      },
      "slack": {
        "type": "switch",
        "available": true
      },
      "task_custom_fields_library": {
        "type": "switch",
        "available": true
      },
      "timeline_layout": {
        "type": "switch",
        "available": true
      },
      "comment_visibility": {
        "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": 428
        }
      },
      "invoice": {
        "data": {
          "type": "invoices",
          "id": "49"
        }
      },
      "service": {
        "data": null
      },
      "expense": {
        "data": null
      },
      "service_type": {
        "data": {
          "type": "service_types",
          "id": "94"
        }
      }
    }
  },
  "included": [
    {
      "id": "49",
      "type": "invoices",
      "attributes": {
        "number": "2016/01",
        "subject": null,
        "invoiced_on": "2021-09-21",
        "sent_on": null,
        "pay_on": "2021-10-01",
        "delivery_on": null,
        "paid_on": null,
        "finalized_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": "2b707eaace2a98fca0e19ed19327b45c",
        "purchase_order_number": null,
        "export_invoice_url": null,
        "company_reference_id": null,
        "created_at": "2021-09-21T01:05:16.384+02:00",
        "exchange_rate": "1.25",
        "exchange_date": "2021-09-21",
        "custom_fields": null,
        "updated_at": "2021-09-21T01:05:16.426+02:00",
        "sample_data": false,
        "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": 428
          }
        },
        "bill_to": {
          "data": null
        },
        "bill_from": {
          "data": null
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "1408"
          }
        },
        "document_type": {
          "data": null
        },
        "creator": {
          "data": {
            "type": "people",
            "id": "1017"
          }
        },
        "subsidiary": {
          "data": null
        },
        "invoice_attributions": {
          "data": []
        },
        "attachment": {
          "data": null
        }
      }
    },
    {
      "id": "94",
      "type": "service_types",
      "attributes": {
        "name": "test name",
        "category_id": null,
        "archived_at": null,
        "description": "test description"
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 428
          }
        }
      }
    },
    {
      "id": "1408",
      "type": "companies",
      "attributes": {
        "name": "Client981",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2021-09-21T01:05:16.379+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {},
        "sample_data": false
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 428
          }
        }
      }
    },
    {
      "id": "1017",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user1002@email.com",
        "title": null,
        "joined_at": "2021-09-21T01:05:16.000+02:00",
        "last_seen_at": "2021-09-21T01:05:16.411+02:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "setting_role_id": null,
        "invited_at": null,
        "is_user": true,
        "user_id": 1003,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2021-09-21T01:05:16.358+02:00",
        "placeholder": false,
        "color_id": null,
        "contact": {},
        "sample_data": false
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 428
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "1407"
          }
        },
        "subsidiary": {
          "data": null
        },
        "holiday_calendar": {
          "data": null
        }
      }
    },
    {
      "id": "1407",
      "type": "companies",
      "attributes": {
        "name": "Organization428",
        "billing_name": null,
        "vat": null,
        "default_currency": "USD",
        "created_at": "2021-09-21T01:05:16.357+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {},
        "sample_data": false
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 428
          }
        }
      }
    }
  ],
  "meta": {
    "organization_features": {
      "custom_fields": {
        "type": "metered",
        "limit": 15
      },
      "custom_fields_per_project": {
        "type": "metered",
        "limit": 10
      },
      "public_custom_reports": {
        "type": "metered",
        "limit": 100
      },
      "private_custom_reports": {
        "type": "metered",
        "limit": 30
      },
      "public_project_reports": {
        "type": "metered",
        "limit": 30
      },
      "private_project_reports": {
        "type": "metered",
        "limit": 10
      },
      "scheduling_placeholders": {
        "type": "metered",
        "limit": 5
      },
      "recycle_bin": {
        "type": "restricted",
        "available": true,
        "limit": 180
      },
      "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
      },
      "slack": {
        "type": "switch",
        "available": true
      },
      "task_custom_fields_library": {
        "type": "switch",
        "available": true
      },
      "timeline_layout": {
        "type": "switch",
        "available": true
      },
      "comment_visibility": {
        "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 20 Sep 2021