Create a Line Item
POST/invoices/:invoice_id/items
Creates an item to be added to a draft invoice.
Request
Path Parameters
Possible values: <= 36 characters, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
Invoice's ID
- application/json
Body
required
Description of the line item
Possible values: >= 1
Quantity. The total will be calculated by multiplying the quantity and the unit_amount
unit_amount
object
required
Money representation
Possible values: <= 9999999999
Amount expressed in cents. 1 USD should be submitted as 100 cents
ISO 4217 representation of the currency
Responses
- 200
- 401
- 403
- 404
- 409
- 422
- 500
Invoice updated successfully
- application/json
- Schema
- Example (from schema)
Schema
Possible values: [success]
Possible values: [200]
Possible values: [Successful request]
{
"status": "success",
"code": 200,
"message": "Successful request"
}
Access token is missing or invalid
Access denied
Invoice not found
- application/json
- Schema
- Example (from schema)
Schema
Possible values: [not found]
Possible values: [404]
Failure reason
{
"status": "not found",
"code": 404,
"message": "Entity not found"
}
Request failed due to a conflict in the provided entity
- application/json
- Schema
- Example (from schema)
Schema
Possible values: [fail]
Possible values: [409]
Failure reason
{
"status": "fail",
"code": 409,
"message": "Entity with Id already exists"
}
Request failed due to validation failure
- application/json
- Schema
- Example (from schema)
Schema
Possible values: [error]
Possible values: [422]
{
"status": "error",
"data": {
"dob": {
"day": "Value expected to be 'integer', 'string' given."
}
},
"code": 422,
"message": "cannot process the provided entity"
}
Server error