Retrieve an Invoice
GET/invoices/:invoice_id
Returns an 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
Responses
- 200
- 401
- 403
- 404
- 409
- 422
- 500
Invoice retrieved
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
Possible values: [success]
data
object
Invoice
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}$
UUID v4
Possible values: [draft, open, processing, paid, uncollectible, void]
total_amount
object
Money representation
Possible values: <= 9999999999
Amount expressed in cents. 1 USD should be submitted as 100 cents
ISO 4217 representation of the currency
subtotal_amount
object
Money representation
Possible values: <= 9999999999
Amount expressed in cents. 1 USD should be submitted as 100 cents
ISO 4217 representation of the currency
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}$
UUID v4
Name of the customer the invoice is linked to.
Possible values: <= 255 characters
Email Address
Unix timestamp representing the date
When true the invoice can be finialized as it meets minimum required data.
If the invoice cannot be finalized, errors will be returned here.
Whether the invoice can be edited or not.
Whether the invoice can be paid or not.
Whether the invoice can be sent through email or not.
line_items
object[]
nullable
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}$
UUID v4
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
Money representation
Possible values: <= 9999999999
Amount expressed in cents. 1 USD should be submitted as 100 cents
ISO 4217 representation of the currency
total_amount
object
Money representation
Possible values: <= 9999999999
Amount expressed in cents. 1 USD should be submitted as 100 cents
ISO 4217 representation of the currency
discounted_total
object
Money representation
Possible values: <= 9999999999
Amount expressed in cents. 1 USD should be submitted as 100 cents
ISO 4217 representation of the currency
Unix timestamp representing the date
Possible values: [200]
Possible values: [Successful request]
{
"status": "success",
"data": {
"id": "ec7e1848-dc80-4ab0-8827-dd7fc0737b43",
"status": "draft",
"total_amount": {
"value": 99,
"currency": "USD"
},
"subtotal_amount": {
"value": 99,
"currency": "USD"
},
"customer_id": "ec7e1848-dc80-4ab0-8827-dd7fc0737b43",
"customer_name": "string",
"customer_email": "peter@pathly.io",
"due_date": 1656656767,
"can_finalize": true,
"finalize_errors": "string",
"can_be_edited": true,
"can_be_paid": true,
"can_be_sent": true,
"line_items": [
{
"id": "ec7e1848-dc80-4ab0-8827-dd7fc0737b43",
"description": "Web design service hour",
"quantity": 5,
"unit_amount": {
"value": 99,
"currency": "USD"
},
"total_amount": {
"value": 99,
"currency": "USD"
},
"discounted_total": {
"value": 99,
"currency": "USD"
}
}
],
"created_on": 1656656767
},
"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"
}
Payment Method not found
- 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 invalid data provided
- 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