# Get an invoice

> 

## GET /invoices/{invoice}



### Request and responses

```json
{
  "servers": [
    {
      "url": "https://app.fsaskaita.lt/api",
      "description": "Production"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "operation": {
    "operationId": "getInvoice",
    "summary": "Get an invoice",
    "tags": [
      "Invoices"
    ],
    "parameters": [
      {
        "name": "invoice",
        "in": "path",
        "required": true,
        "description": "The invoice ID.",
        "schema": {
          "type": "string"
        }
      }
    ],
    "responses": {
      "200": {
        "description": "`Invoice`",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "data": {
                  "$ref": "#/components/schemas/Invoice"
                }
              },
              "required": [
                "data"
              ]
            }
          }
        }
      },
      "401": {
        "$ref": "#/components/responses/AuthenticationException"
      },
      "404": {
        "description": "The invoice does not exist or belongs to another business.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "message"
              ]
            }
          }
        }
      },
      "429": {
        "description": "Rate limit exceeded. The limit is 60 requests per minute per business, shared across all of its tokens. Wait `Retry-After` seconds before retrying.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "message"
              ]
            }
          }
        },
        "headers": {
          "Retry-After": {
            "description": "Seconds to wait before retrying.",
            "schema": {
              "type": "integer"
            }
          },
          "X-RateLimit-Limit": {
            "description": "Requests allowed per minute.",
            "schema": {
              "type": "integer"
            }
          },
          "X-RateLimit-Remaining": {
            "description": "Requests left in the current minute.",
            "schema": {
              "type": "integer"
            }
          },
          "X-RateLimit-Reset": {
            "description": "Unix timestamp at which the window resets.",
            "schema": {
              "type": "integer"
            }
          }
        }
      }
    }
  },
  "securitySchemes": {
    "bearerAuth": {
      "type": "http",
      "description": "Business token created in the app under Settings, Integrations, API. The token is scoped to exactly one business, has no expiry and is shown only once. Send it as `Authorization: Bearer <token>` together with `Accept: application/json`.",
      "scheme": "bearer"
    }
  }
}
```

### Referenced components

```json
{
  "#/components/schemas/Invoice": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "format": "uuid"
      },
      "business_id": {
        "type": "string",
        "format": "uuid"
      },
      "invoice_type": {
        "$ref": "#/components/schemas/InvoiceType"
      },
      "series": {
        "type": "string"
      },
      "invoice_number": {
        "type": "string",
        "description": "Zero-padded to three digits, e.g. `\"007\"`. Send it back padded or unpadded on update; both are accepted."
      },
      "invoice_date": {
        "type": "string",
        "format": "date",
        "description": "Issue date, `Y-m-d`."
      },
      "pay_until_date": {
        "type": [
          "string",
          "null"
        ],
        "format": "date",
        "description": "Due date, `Y-m-d`."
      },
      "language": {
        "$ref": "#/components/schemas/InvoiceLanguage"
      },
      "subtotal": {
        "type": "number",
        "description": "Sum of the lines excluding VAT."
      },
      "vat": {
        "type": "number"
      },
      "total_incl_vat": {
        "type": "number"
      },
      "currency": {
        "type": "string"
      },
      "payment_status": {
        "$ref": "#/components/schemas/PaymentStatus"
      },
      "notes": {
        "type": [
          "string",
          "null"
        ]
      },
      "share_link": {
        "type": "string",
        "format": "uri",
        "description": "Public link to the invoice; anyone with the link can view it."
      },
      "seller": {
        "type": "object",
        "properties": {
          "business_type": {
            "$ref": "#/components/schemas/BusinessType"
          },
          "first_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "company_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "company_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "individual_activity_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "vat_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "address": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "custom_fields": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string"
                },
                "value": {
                  "type": "string"
                }
              },
              "required": [
                "label",
                "value"
              ]
            }
          }
        },
        "required": [
          "business_type",
          "first_name",
          "last_name",
          "company_name",
          "company_code",
          "individual_activity_id",
          "vat_code",
          "address",
          "email",
          "phone",
          "custom_fields"
        ]
      },
      "buyer": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "`person` sent on input is returned as `individual`.",
            "enum": [
              "company",
              "individual"
            ]
          },
          "first_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "company_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "company_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "individual_activity_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "vat_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "address": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "type",
          "first_name",
          "last_name",
          "company_name",
          "company_code",
          "individual_activity_id",
          "vat_code",
          "address",
          "email",
          "phone"
        ]
      },
      "items": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/InvoiceItem"
        }
      },
      "payment_options": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/PaymentOption"
        }
      },
      "created_at": {
        "type": "integer",
        "description": "Unix timestamp, seconds."
      },
      "updated_at": {
        "type": "integer",
        "description": "Unix timestamp, seconds."
      }
    },
    "required": [
      "id",
      "business_id",
      "invoice_type",
      "series",
      "invoice_number",
      "invoice_date",
      "pay_until_date",
      "language",
      "subtotal",
      "vat",
      "total_incl_vat",
      "currency",
      "payment_status",
      "notes",
      "share_link",
      "seller",
      "buyer",
      "items",
      "payment_options",
      "created_at",
      "updated_at"
    ],
    "title": "Invoice"
  },
  "#/components/schemas/InvoiceType": {
    "type": "string",
    "description": "The three `*vat_invoice` types require `vat_percentage` on every line and, when `seller` is sent, `seller.vat_code`.\n",
    "enum": [
      "regular_invoice",
      "vat_invoice",
      "preliminary_invoice",
      "preliminary_vat_invoice",
      "credit_invoice",
      "credit_vat_invoice"
    ],
    "title": "InvoiceType"
  },
  "#/components/schemas/InvoiceLanguage": {
    "type": "string",
    "description": "Language of the PDF and the public share page.\n",
    "enum": [
      "en",
      "lt",
      "es",
      "de",
      "fr"
    ],
    "title": "InvoiceLanguage"
  },
  "#/components/schemas/PaymentStatus": {
    "type": "string",
    "enum": [
      "not_paid",
      "paid"
    ],
    "title": "PaymentStatus"
  },
  "#/components/schemas/BusinessType": {
    "type": "string",
    "description": "Every type except `individual_activity` is a company.\n",
    "enum": [
      "small_partnership",
      "individual_activity",
      "private_limited_liability_company",
      "sole_proprietorship",
      "public_institution",
      "association",
      "joint_stock_company"
    ],
    "title": "BusinessType"
  },
  "#/components/schemas/InvoiceItem": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "format": "uuid"
      },
      "name": {
        "type": "string"
      },
      "price": {
        "type": "number"
      },
      "vat_percentage": {
        "type": [
          "number",
          "null"
        ]
      },
      "quantity": {
        "type": "number"
      },
      "units": {
        "type": "string"
      }
    },
    "required": [
      "id",
      "name",
      "price",
      "vat_percentage",
      "quantity",
      "units"
    ],
    "title": "InvoiceItem"
  },
  "#/components/schemas/PaymentOption": {
    "type": "object",
    "properties": {
      "type": {
        "$ref": "#/components/schemas/PaymentOptionType"
      },
      "bank_account": {
        "type": [
          "string",
          "null"
        ]
      },
      "bank_name": {
        "type": [
          "string",
          "null"
        ]
      },
      "routing_or_sort_number": {
        "type": [
          "string",
          "null"
        ]
      },
      "swift_bic_code": {
        "type": [
          "string",
          "null"
        ]
      },
      "fields": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/LabelValue"
        }
      }
    },
    "required": [
      "type",
      "fields"
    ],
    "title": "PaymentOption"
  },
  "#/components/schemas/PaymentOptionType": {
    "type": "string",
    "description": "`bank` carries the bank account fields; `other` carries free-form label/value `fields`.\n",
    "enum": [
      "bank",
      "other"
    ],
    "title": "PaymentOptionType"
  },
  "#/components/schemas/LabelValue": {
    "type": "object",
    "properties": {
      "label": {
        "type": "string"
      },
      "value": {
        "type": "string"
      }
    },
    "required": [
      "label",
      "value"
    ],
    "title": "LabelValue"
  },
  "#/components/responses/AuthenticationException": {
    "description": "Unauthenticated",
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "message": {
              "type": "string",
              "description": "Error overview."
            }
          },
          "required": [
            "message"
          ]
        }
      }
    }
  }
}
```
