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": 408
          }
        },
        "invoice": {
          "data": {
            "type": "invoices",
            "id": "41"
          }
        },
        "service": {
          "data": null
        },
        "expense": {
          "data": null
        },
        "service_type": {
          "data": {
            "type": "service_types",
            "id": "89"
          }
        }
      }
    }
  ],
  "included": [
    {
      "id": "41",
      "type": "invoices",
      "attributes": {
        "number": "2016/01",
        "subject": null,
        "invoiced_on": "2021-06-16",
        "sent_on": null,
        "pay_on": "2021-06-26",
        "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": "94e3a8e7d66eabc0f3831b72e995c396",
        "purchase_order_number": null,
        "export_invoice_url": null,
        "company_reference_id": null,
        "created_at": "2021-06-16T01:04:54.837+02:00",
        "exchange_rate": "1.25",
        "exchange_date": "2021-06-16",
        "custom_fields": null,
        "updated_at": "2021-06-16T01:04:54.856+02:00",
        "sample_data": null,
        "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": 408
          }
        },
        "bill_to": {
          "data": null
        },
        "bill_from": {
          "data": null
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "1363"
          }
        },
        "document_type": {
          "data": null
        },
        "creator": {
          "data": {
            "type": "people",
            "id": "989"
          }
        },
        "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": 408
          }
        }
      }
    },
    {
      "id": "1363",
      "type": "companies",
      "attributes": {
        "name": "Client956",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2021-06-16T01:04:54.832+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {},
        "sample_data": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 408
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "989",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user974@email.com",
        "title": null,
        "joined_at": "2021-06-16T01:04:54.000+02:00",
        "last_seen_at": "2021-06-16T01:04:54.870+02:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "user_id": 975,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2021-06-16T01:04:54.809+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0,
        "contact": {},
        "sample_data": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 408
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "1362"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "1362",
      "type": "companies",
      "attributes": {
        "name": "Organization408",
        "billing_name": null,
        "vat": null,
        "default_currency": "USD",
        "created_at": "2021-06-16T01:04:54.808+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {},
        "sample_data": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 408
          }
        },
        "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
      },
      "public_project_reports": {
        "type": "metered",
        "limit": 30
      },
      "private_project_reports": {
        "type": "metered",
        "limit": 10
      },
      "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
      },
      "slack": {
        "type": "switch",
        "available": true
      },
      "task_custom_fields_library": {
        "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": 409
        }
      },
      "invoice": {
        "data": {
          "type": "invoices",
          "id": "42"
        }
      },
      "service": {
        "data": null
      },
      "expense": {
        "data": null
      },
      "service_type": {
        "data": {
          "type": "service_types",
          "id": "90"
        }
      }
    }
  },
  "included": [
    {
      "id": "42",
      "type": "invoices",
      "attributes": {
        "number": "2016/01",
        "subject": null,
        "invoiced_on": "2021-06-16",
        "sent_on": null,
        "pay_on": "2021-06-26",
        "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": "57cf9fefe576ce7685ea3b3fcf0b0585",
        "purchase_order_number": null,
        "export_invoice_url": null,
        "company_reference_id": null,
        "created_at": "2021-06-16T01:04:55.016+02:00",
        "exchange_rate": "1.25",
        "exchange_date": "2021-06-16",
        "custom_fields": null,
        "updated_at": "2021-06-16T01:04:55.033+02:00",
        "sample_data": null,
        "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": 409
          }
        },
        "bill_to": {
          "data": null
        },
        "bill_from": {
          "data": null
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "1365"
          }
        },
        "document_type": {
          "data": null
        },
        "creator": {
          "data": {
            "type": "people",
            "id": "990"
          }
        },
        "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": 409
          }
        }
      }
    },
    {
      "id": "1365",
      "type": "companies",
      "attributes": {
        "name": "Client957",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2021-06-16T01:04:55.011+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {},
        "sample_data": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 409
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "990",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user975@email.com",
        "title": null,
        "joined_at": "2021-06-16T01:04:55.000+02:00",
        "last_seen_at": "2021-06-16T01:04:55.045+02:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "user_id": 976,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2021-06-16T01:04:54.988+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0,
        "contact": {},
        "sample_data": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 409
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "1364"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "1364",
      "type": "companies",
      "attributes": {
        "name": "Organization409",
        "billing_name": null,
        "vat": null,
        "default_currency": "USD",
        "created_at": "2021-06-16T01:04:54.987+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {},
        "sample_data": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 409
          }
        },
        "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
      },
      "public_project_reports": {
        "type": "metered",
        "limit": 30
      },
      "private_project_reports": {
        "type": "metered",
        "limit": 10
      },
      "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
      },
      "slack": {
        "type": "switch",
        "available": true
      },
      "task_custom_fields_library": {
        "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": "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": 410
        }
      },
      "invoice": {
        "data": {
          "type": "invoices",
          "id": "43"
        }
      },
      "service": {
        "data": null
      },
      "expense": {
        "data": null
      },
      "service_type": {
        "data": {
          "type": "service_types",
          "id": "91"
        }
      }
    }
  },
  "included": [
    {
      "id": "43",
      "type": "invoices",
      "attributes": {
        "number": "2016/01",
        "subject": null,
        "invoiced_on": "2021-06-16",
        "sent_on": null,
        "pay_on": "2021-06-26",
        "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": "9762b7f122863a8c8c33ab46bfa74563",
        "purchase_order_number": null,
        "export_invoice_url": null,
        "company_reference_id": null,
        "created_at": "2021-06-16T01:04:55.163+02:00",
        "exchange_rate": "1.25",
        "exchange_date": "2021-06-16",
        "custom_fields": null,
        "updated_at": "2021-06-16T01:04:55.213+02:00",
        "sample_data": null,
        "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": 410
          }
        },
        "bill_to": {
          "data": null
        },
        "bill_from": {
          "data": null
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "1367"
          }
        },
        "document_type": {
          "data": null
        },
        "creator": {
          "data": {
            "type": "people",
            "id": "991"
          }
        },
        "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": 410
          }
        }
      }
    },
    {
      "id": "1367",
      "type": "companies",
      "attributes": {
        "name": "Client958",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2021-06-16T01:04:55.158+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {},
        "sample_data": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 410
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "991",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user976@email.com",
        "title": null,
        "joined_at": "2021-06-16T01:04:55.000+02:00",
        "last_seen_at": "2021-06-16T01:04:55.193+02:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "user_id": 977,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2021-06-16T01:04:55.135+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0,
        "contact": {},
        "sample_data": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 410
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "1366"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "1366",
      "type": "companies",
      "attributes": {
        "name": "Organization410",
        "billing_name": null,
        "vat": null,
        "default_currency": "USD",
        "created_at": "2021-06-16T01:04:55.134+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {},
        "sample_data": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 410
          }
        },
        "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
      },
      "public_project_reports": {
        "type": "metered",
        "limit": 30
      },
      "private_project_reports": {
        "type": "metered",
        "limit": 10
      },
      "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
      },
      "slack": {
        "type": "switch",
        "available": true
      },
      "task_custom_fields_library": {
        "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": 413
        }
      },
      "invoice": {
        "data": {
          "type": "invoices",
          "id": "46"
        }
      },
      "service": {
        "data": null
      },
      "expense": {
        "data": null
      },
      "service_type": {
        "data": {
          "type": "service_types",
          "id": "94"
        }
      }
    }
  },
  "included": [
    {
      "id": "46",
      "type": "invoices",
      "attributes": {
        "number": "2016/01",
        "subject": null,
        "invoiced_on": "2021-06-16",
        "sent_on": null,
        "pay_on": "2021-06-26",
        "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": "ff88c616493362ff2be2d27e48c83b37",
        "purchase_order_number": null,
        "export_invoice_url": null,
        "company_reference_id": null,
        "created_at": "2021-06-16T01:04:55.543+02:00",
        "exchange_rate": "1.25",
        "exchange_date": "2021-06-16",
        "custom_fields": null,
        "updated_at": "2021-06-16T01:04:55.587+02:00",
        "sample_data": null,
        "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": 413
          }
        },
        "bill_to": {
          "data": null
        },
        "bill_from": {
          "data": null
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "1373"
          }
        },
        "document_type": {
          "data": null
        },
        "creator": {
          "data": {
            "type": "people",
            "id": "994"
          }
        },
        "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": 413
          }
        }
      }
    },
    {
      "id": "1373",
      "type": "companies",
      "attributes": {
        "name": "Client961",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2021-06-16T01:04:55.539+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {},
        "sample_data": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 413
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "994",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user979@email.com",
        "title": null,
        "joined_at": "2021-06-16T01:04:55.000+02:00",
        "last_seen_at": "2021-06-16T01:04:55.573+02:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "user_id": 980,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2021-06-16T01:04:55.516+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0,
        "contact": {},
        "sample_data": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 413
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "1372"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "1372",
      "type": "companies",
      "attributes": {
        "name": "Organization413",
        "billing_name": null,
        "vat": null,
        "default_currency": "USD",
        "created_at": "2021-06-16T01:04:55.514+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {},
        "sample_data": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 413
          }
        },
        "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
      },
      "public_project_reports": {
        "type": "metered",
        "limit": 30
      },
      "private_project_reports": {
        "type": "metered",
        "limit": 10
      },
      "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
      },
      "slack": {
        "type": "switch",
        "available": true
      },
      "task_custom_fields_library": {
        "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 15 Jun 2021