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": 356
          }
        },
        "invoice": {
          "data": {
            "type": "invoices",
            "id": "36"
          }
        },
        "service": {
          "data": null
        },
        "expense": {
          "data": null
        },
        "service_type": {
          "data": {
            "type": "service_types",
            "id": "51"
          }
        }
      }
    }
  ],
  "included": [
    {
      "id": "36",
      "type": "invoices",
      "attributes": {
        "number": "2016/01",
        "subject": null,
        "invoiced_on": "2020-08-11",
        "sent_on": null,
        "pay_on": "2020-08-21",
        "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": "e43d14eacb6965fb407c47c055d1d144",
        "purchase_order_number": null,
        "export_invoice_url": null,
        "company_reference_id": null,
        "created_at": "2020-08-11T01:04:50.027+02:00",
        "custom_fields": 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": 356
          }
        },
        "bill_to": {
          "data": null
        },
        "bill_from": {
          "data": null
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "1024"
          }
        },
        "document_type": {
          "data": null
        },
        "creator": {
          "data": {
            "type": "people",
            "id": "737"
          }
        },
        "invoice_attributions": {
          "data": []
        },
        "attachment": {
          "data": null
        }
      }
    },
    {
      "id": "51",
      "type": "service_types",
      "attributes": {
        "name": "test name",
        "category_id": null,
        "deleted_at": null,
        "archived_at": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 356
          }
        }
      }
    },
    {
      "id": "1024",
      "type": "companies",
      "attributes": {
        "name": "Client669",
        "default_currency": null,
        "created_at": "2020-08-11T01:04:50.014+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 356
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "737",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user723@email.com",
        "title": null,
        "joined_at": "2020-08-11T01:04:50.000+02:00",
        "last_seen_at": "2020-08-11T01:04:50.096+02:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-08-11T01:04:49.979+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 356
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "1023"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "1023",
      "type": "companies",
      "attributes": {
        "name": "Organization356",
        "default_currency": "USD",
        "created_at": "2020-08-11T01:04:49.976+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 356
          }
        },
        "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": 30,
        "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
      }
    }
  }
}

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": 357
        }
      },
      "invoice": {
        "data": {
          "type": "invoices",
          "id": "37"
        }
      },
      "service": {
        "data": null
      },
      "expense": {
        "data": null
      },
      "service_type": {
        "data": {
          "type": "service_types",
          "id": "52"
        }
      }
    }
  },
  "included": [
    {
      "id": "37",
      "type": "invoices",
      "attributes": {
        "number": "2016/01",
        "subject": null,
        "invoiced_on": "2020-08-11",
        "sent_on": null,
        "pay_on": "2020-08-21",
        "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": "d478f170d62f9e1496ecf9a8bb99f317",
        "purchase_order_number": null,
        "export_invoice_url": null,
        "company_reference_id": null,
        "created_at": "2020-08-11T01:04:50.320+02:00",
        "custom_fields": 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": 357
          }
        },
        "bill_to": {
          "data": null
        },
        "bill_from": {
          "data": null
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "1026"
          }
        },
        "document_type": {
          "data": null
        },
        "creator": {
          "data": {
            "type": "people",
            "id": "738"
          }
        },
        "invoice_attributions": {
          "data": []
        },
        "attachment": {
          "data": null
        }
      }
    },
    {
      "id": "52",
      "type": "service_types",
      "attributes": {
        "name": "test name",
        "category_id": null,
        "deleted_at": null,
        "archived_at": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 357
          }
        }
      }
    },
    {
      "id": "1026",
      "type": "companies",
      "attributes": {
        "name": "Client670",
        "default_currency": null,
        "created_at": "2020-08-11T01:04:50.311+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 357
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "738",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user724@email.com",
        "title": null,
        "joined_at": "2020-08-11T01:04:50.000+02:00",
        "last_seen_at": "2020-08-11T01:04:50.383+02:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-08-11T01:04:50.276+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 357
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "1025"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "1025",
      "type": "companies",
      "attributes": {
        "name": "Organization357",
        "default_currency": "USD",
        "created_at": "2020-08-11T01:04:50.273+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 357
          }
        },
        "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": 30,
        "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
      }
    }
  }
}

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.0",
      "description": "test name",
      "service_type_id": 53
    },
    "relationships": {
      "invoice": {
        "data": {
          "type": "invoices",
          "id": "38"
        }
      }
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "6",
    "type": "line_items",
    "attributes": {
      "unit_id": 2,
      "position": 2,
      "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": 358
        }
      },
      "invoice": {
        "data": {
          "type": "invoices",
          "id": "38"
        }
      },
      "service": {
        "data": null
      },
      "expense": {
        "data": null
      },
      "service_type": {
        "data": {
          "type": "service_types",
          "id": "53"
        }
      }
    }
  },
  "included": [
    {
      "id": "38",
      "type": "invoices",
      "attributes": {
        "number": "2016/01",
        "subject": null,
        "invoiced_on": "2020-08-11",
        "sent_on": null,
        "pay_on": "2020-08-21",
        "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": "d5bfa1ba1a739df5e2d5877b250b8c8c",
        "purchase_order_number": null,
        "export_invoice_url": null,
        "company_reference_id": null,
        "created_at": "2020-08-11T01:04:50.602+02:00",
        "custom_fields": 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": 358
          }
        },
        "bill_to": {
          "data": null
        },
        "bill_from": {
          "data": null
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "1028"
          }
        },
        "document_type": {
          "data": null
        },
        "creator": {
          "data": {
            "type": "people",
            "id": "739"
          }
        },
        "invoice_attributions": {
          "data": []
        },
        "attachment": {
          "data": null
        }
      }
    },
    {
      "id": "53",
      "type": "service_types",
      "attributes": {
        "name": "test name",
        "category_id": null,
        "deleted_at": null,
        "archived_at": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 358
          }
        }
      }
    },
    {
      "id": "1028",
      "type": "companies",
      "attributes": {
        "name": "Client671",
        "default_currency": null,
        "created_at": "2020-08-11T01:04:50.593+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 358
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "739",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user725@email.com",
        "title": null,
        "joined_at": "2020-08-11T01:04:50.000+02:00",
        "last_seen_at": "2020-08-11T01:04:50.661+02:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-08-11T01:04:50.553+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 358
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "1027"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "1027",
      "type": "companies",
      "attributes": {
        "name": "Organization358",
        "default_currency": "USD",
        "created_at": "2020-08-11T01:04:50.549+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 358
          }
        },
        "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": 30,
        "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
      }
    }
  }
}

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"
      }
    },
    {
      "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": 361
        }
      },
      "invoice": {
        "data": {
          "type": "invoices",
          "id": "41"
        }
      },
      "service": {
        "data": null
      },
      "expense": {
        "data": null
      },
      "service_type": {
        "data": {
          "type": "service_types",
          "id": "56"
        }
      }
    }
  },
  "included": [
    {
      "id": "41",
      "type": "invoices",
      "attributes": {
        "number": "2016/01",
        "subject": null,
        "invoiced_on": "2020-08-11",
        "sent_on": null,
        "pay_on": "2020-08-21",
        "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": "8b2aabb4d7693beaa174ad26081594e8",
        "purchase_order_number": null,
        "export_invoice_url": null,
        "company_reference_id": null,
        "created_at": "2020-08-11T01:04:51.239+02:00",
        "custom_fields": 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": 361
          }
        },
        "bill_to": {
          "data": null
        },
        "bill_from": {
          "data": null
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "1034"
          }
        },
        "document_type": {
          "data": null
        },
        "creator": {
          "data": {
            "type": "people",
            "id": "742"
          }
        },
        "invoice_attributions": {
          "data": []
        },
        "attachment": {
          "data": null
        }
      }
    },
    {
      "id": "56",
      "type": "service_types",
      "attributes": {
        "name": "test name",
        "category_id": null,
        "deleted_at": null,
        "archived_at": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 361
          }
        }
      }
    },
    {
      "id": "1034",
      "type": "companies",
      "attributes": {
        "name": "Client674",
        "default_currency": null,
        "created_at": "2020-08-11T01:04:51.230+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 361
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "742",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user728@email.com",
        "title": null,
        "joined_at": "2020-08-11T01:04:51.000+02:00",
        "last_seen_at": "2020-08-11T01:04:51.292+02:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-08-11T01:04:51.208+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 361
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "1033"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "1033",
      "type": "companies",
      "attributes": {
        "name": "Organization361",
        "default_currency": "USD",
        "created_at": "2020-08-11T01:04:51.206+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 361
          }
        },
        "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": 30,
        "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
      }
    }
  }
}

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 10 Aug 2020