invoices create
POST {{baseUrl}}/invoices
Creates an Invoice
object with the given values.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
is_debug_mode | boolean | Whether to include debug fields (such as log file links) in the response. | |
run_async | boolean | Whether or not third-party updates should be run asynchronously. |
Request Body
{"model"=>{"contact"=>"3fa85f64-5717-4562-b3fc-2c963f66afa6", "number"=>"string", "type"=>"ACCOUNTS_RECEIVABLE", "issue_date"=>"2023-10-01T00:00:00", "due_date"=>"2023-10-31T00:00:00", "status"=>"OPEN", "memo"=>"string", "company"=>"3fa85f64-5717-4562-b3fc-2c963f66afa6", "exchange_rate"=>"2.9", "tracking_categories"=>["3fa85f64-5717-4562-b3fc-2c963f66afa6"], "line_items"=>[{"remote_id"=>"8765432", "description"=>"Pickleball lessons", "unit_price"=>50, "quantity"=>1, "total_amount"=>50, "currency"=>"USD", "exchange_rate"=>"2.9", "item"=>"5b3c1341-a20f-4e51-b72c-f3830a16c97b", "account"=>"cd0f32d4-a493-11ec-b909-0242ac120002", "tracking_categories"=>["b38c59b0-a9d7-4740-b1ee-5436c6751e3d", "9b840d2-686a-465a-8a8e-7b028498f8e4", "a47e11b6-c73b-4a0c-be31-130fc48177fa"]}]}}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
X-Account-Token | string | (Required) Token identifying the end user. | |
Content-Type | string | ||
Accept | string |
RESPONSES
status: Created
{"errors":[{"detail":"custom_fields is a required field on model.","problem_type":"MISSING_REQUIRED_FIELD","title":"Missing Required Field","source":{"pointer":"aute minim ea"}},{"detail":"custom_fields is a required field on model.","problem_type":"MISSING_REQUIRED_FIELD","title":"Missing Required Field","source":{"pointer":"proident nisi"}}],"model":{"id":"9871b4a9-f5d2-4f3b-a66b-dfedbed42c46","remote_id":"990110","type":"ACCOUNTS_RECEIVABLE","contact":"022a2bef-57e5-4def-8ed2-7c41bd9a5ed8","number":"AIQ12546","issue_date":"2020-03-31T00:00:00Z","due_date":"2020-04-15T00:00:00Z","paid_on_date":"2020-04-01T00:00:00Z","memo":"Weekly Payment","currency":"UYI","total_discount":41315964.34564364,"sub_total":100,"total_tax_amount":5,"total_amount":105,"balance":105,"remote_updated_at":"2020-04-01T00:00:00Z","payments":["b26fd49a-cbae-470a-a8f8-bcbc119e0390"],"line_items":[{"remote_id":"8765432","description":"Pickleball lessons","unit_price":50,"quantity":2,"total_amount":100,"item":"5b3c1341-a20f-4e51-b72c-f3830a16c97b","remote_data":[{"path":"/actions","data":["Varies by platform"]}]}]},"warnings":[{"detail":"An unrecognized field, age, was passed in with request data.","problem_type":"UNRECOGNIZED_FIELD","title":"Unrecognized Field","source":{"pointer":"mollit laboris dolore"}},{"detail":"An unrecognized field, age, was passed in with request data.","problem_type":"UNRECOGNIZED_FIELD","title":"Unrecognized Field","source":{"pointer":"non Excepteur ex eu"}}],"logs":[{"dashboard_view":"https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832","log_id":"99433219-8017-4acd-bb3c-ceb23d663832","log_summary":{"method":"POST","status_code":200,"url":"https://harvest.greenhouse.io/v1/candidates/"}},{"dashboard_view":"https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832","log_id":"99433219-8017-4acd-bb3c-ceb23d663832","log_summary":{"method":"POST","status_code":200,"url":"https://harvest.greenhouse.io/v1/candidates/"}}]}