> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.gappify.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.gappify.com/_mcp/server.

# Retrieve Invoices by ID

GET https://api.gappify.com/v1/invoices/{source-system-id}

Retrieve Invoices by ID

Reference: https://developers.gappify.com/api-reference/inbound-to-gappify/3/get-by-id

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Servers

- `https://api.gappify.com/v1` (Production, default)
- `https://api.uat.gappifyinc.com/v1` (UAT)

## Request

### Path parameters

- `source-system-id` (string, required)

## Response

### 200

- `source_system_id` (string, required) — Unique identifier of the invoice in the ERP system. This value will be used to match source data and perform upserts.
- `vendor_id` (string, required) — Id of the Vendor/Supplier. This value should match the source_vendors->g_source_system_id which will be used to send back as part of JE to ERP.
- `invoice_number` (string, required) — Invoice number.
- `invoice_date` (date, required) — Date the invoice was issued by the vendor. Format: yyyy-mm-dd.
- `currency_id` (string, required) — Transactional currency id of the invoice. This value should match the g_source_system_id in source_coas.
- `invoice_amount` (double, required) — Invoice or Invoice line amount.
- `invoice_type` (string, optional) — Type of invoice.
- `invoice_line_id` (string, optional) — Id of the invoice line.
- `invoice_date_created` (datetime, optional) — This is the date and time when the invoice is created in the source system.
- `po_id` (string, optional) — Id of the PO linked to the invoice.
- `memo` (string, optional) — Invoice header memo.
- `created_by` (string, optional)
- `last_modified_by` (string, optional)
- `period` (string, optional) — Period representation of the invoice. **Format:** `yyyy-mm-01` (e.g., `2026-03-01`).'
- `subsidiary_debit_id` (string, optional) — Subsidiary id linked to the invoice. This value should match the g_source_system_id in source_coas.
- `item` (string, optional)
- `item_id` (string, optional)
- `glaccount_debit_id` (string, optional) — GLAccount debit id linked to the invoice. This value should match the g_source_system_id in source_coas.
- `glaccount_credit_id` (string, optional) — GLAccount credit id linked to the invoice. This value should match the g_source_system_id in source_coas.
- `department_debit_id` (string, optional) — Department/Cost Center debit id linked to the invoice. This value should match the g_source_system_id in source_coas.
- `department_credit_id` (string, optional) — Department/Cost Center credit id linked to the invoice. This value should match the g_source_system_id in source_coas.
- `product_debit_id` (string, optional) — Product debit id linked to the invoice. This value should match the g_source_system_id in source_coas.
- `product_credit_id` (string, optional) — Product credit id linked to the invoice. This value should match the g_source_system_id in source_coas.
- `location_debit_id` (string, optional) — Location debit id linked to the invoice. This value should match the g_source_system_id in source_coas.
- `location_credit_id` (string, optional) — Location credit id linked to the invoice. This value should match the g_source_system_id in source_coas.
- `class_debit_id` (string, optional) — Class debit id linked to the invoice. This value should match the g_source_system_id in source_coas.
- `class_credit_id` (string, optional) — Class credit id linked to the invoice. This value should match the g_source_system_id in source_coas.
- `project_debit_id` (string, optional) — Project debit id linked to the invoice. This value should match the g_source_system_id in source_coas.
- `project_credit_id` (string, optional) — Project credit id linked to the invoice. This value should match the g_source_system_id in source_coas.
- `invoice_memo` (string, optional) — Description of the invoice or invoice line where applicable.
- `status` (string, optional) — Status of the invoice or invoice line.
- `start_date` (date, optional) — Start date of the invoice or invoice line if applicable.
- `end_date` (date, optional) — End date of the invoice or invoice line if applicable.
- `invoice_quantity` (double, optional) — Quantity based value of the invoice or invoice line if applicable.
- `exchange_rate` (double, optional)
- `channel_debit_id` (string, optional) — Channel debit id linked to the invoice. This value should match the g_source_system_id in source_coas.
- `channel_credit_id` (string, optional) — Channel credit id linked to the invoice. This value should match the g_source_system_id in source_coas.
- `region_debit_id` (string, optional) — Region debit id linked to the invoice. This value should match the g_source_system_id in source_coas.
- `region_credit_id` (string, optional) — Region credit id linked to the invoice. This value should match the g_source_system_id in source_coas.
- `company_debit_id` (string, optional) — Company debit id linked to the invoice. This value should match the g_source_system_id in source_coas.
- `company_credit_id` (string, optional) — Company credit id linked to the invoice. This value should match the g_source_system_id in source_coas.
- `intercompany_debit_id` (string, optional) — Intercompay debit id linked to the invoice. This value should match the g_source_system_id in source_coas.
- `intercompany_credit_id` (string, optional) — Intercompay credit id linked to the invoice. This value should match the g_source_system_id in source_coas.
- `po_number` (string, optional) — PO number linked to the invoice.
- `po_line_id` (string, optional) — Line Id of the PO linked to the invoice.
- `custom_text_1` (string, optional) — User-defined custom text field
- `custom_text_2` (string, optional) — User-defined custom text field
- `custom_text_3` (string, optional) — User-defined custom text field
- `custom_text_4` (string, optional) — User-defined custom text field
- `custom_text_5` (string, optional) — User-defined custom text field
- `custom_date_1` (date, optional) — User-defined custom date field
- `custom_date_2` (date, optional) — User-defined custom date field
- `custom_date_3` (date, optional) — User-defined custom date field
- `custom_date_4` (date, optional) — User-defined custom date field
- `custom_date_5` (date, optional) — User-defined custom date field
- `custom_numeric_1` (double, optional) — User-defined custom numeric field
- `custom_numeric_2` (double, optional) — User-defined custom numeric field
- `custom_numeric_3` (double, optional) — User-defined custom numeric field
- `custom_numeric_4` (double, optional) — User-defined custom numeric field
- `custom_numeric_5` (double, optional) — User-defined custom numeric field
- `invoice_id` (string, optional) — This is the source system id of the invoice header

## Errors

### 401 Unauthorized Error

- `message` (string, required) — The error message
- `success` (boolean, required)

### 422 Unprocessable Entity Error

- `message` (string, required) — The error message
- `errors` (string, required) — The error details

### 404 Not Found Error

- `list of string`

### 500 Internal Server Error

- `list of string`

## Examples

**Response**

```json
{
  "source_system_id": "source_system_id",
  "vendor_id": "vendor_id",
  "invoice_number": "invoice_number",
  "invoice_date": "2023-01-15",
  "currency_id": "currency_id",
  "invoice_amount": 1.1,
  "invoice_type": "invoice_type",
  "invoice_line_id": "invoice_line_id",
  "invoice_date_created": "2024-01-15T09:30:00Z",
  "po_id": "po_id",
  "memo": "memo",
  "created_by": "created_by",
  "last_modified_by": "last_modified_by",
  "period": "period",
  "subsidiary_debit_id": "subsidiary_debit_id",
  "item": "item",
  "item_id": "item_id",
  "glaccount_debit_id": "glaccount_debit_id",
  "glaccount_credit_id": "glaccount_credit_id",
  "department_debit_id": "department_debit_id",
  "department_credit_id": "department_credit_id",
  "product_debit_id": "product_debit_id",
  "product_credit_id": "product_credit_id",
  "location_debit_id": "location_debit_id",
  "location_credit_id": "location_credit_id",
  "class_debit_id": "class_debit_id",
  "class_credit_id": "class_credit_id",
  "project_debit_id": "project_debit_id",
  "project_credit_id": "project_credit_id",
  "invoice_memo": "invoice_memo",
  "status": "status",
  "start_date": "2023-01-15",
  "end_date": "2023-01-15",
  "invoice_quantity": 1.1,
  "exchange_rate": 1.1,
  "channel_debit_id": "channel_debit_id",
  "channel_credit_id": "channel_credit_id",
  "region_debit_id": "region_debit_id",
  "region_credit_id": "region_credit_id",
  "company_debit_id": "company_debit_id",
  "company_credit_id": "company_credit_id",
  "intercompany_debit_id": "intercompany_debit_id",
  "intercompany_credit_id": "intercompany_credit_id",
  "po_number": "po_number",
  "po_line_id": "po_line_id",
  "custom_text_1": "custom_text_1",
  "custom_text_2": "custom_text_2",
  "custom_text_3": "custom_text_3",
  "custom_text_4": "custom_text_4",
  "custom_text_5": "custom_text_5",
  "custom_date_1": "2023-01-15",
  "custom_date_2": "2023-01-15",
  "custom_date_3": "2023-01-15",
  "custom_date_4": "2023-01-15",
  "custom_date_5": "2023-01-15",
  "custom_numeric_1": 1.1,
  "custom_numeric_2": 1.1,
  "custom_numeric_3": 1.1,
  "custom_numeric_4": 1.1,
  "custom_numeric_5": 1.1,
  "invoice_id": "invoice_id"
}
```

**SDK Code**

```python
import requests

url = "https://api.gappify.com/v1/invoices/source-system-id"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.gappify.com/v1/invoices/source-system-id';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.gappify.com/v1/invoices/source-system-id"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.gappify.com/v1/invoices/source-system-id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.gappify.com/v1/invoices/source-system-id")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.gappify.com/v1/invoices/source-system-id', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.gappify.com/v1/invoices/source-system-id");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.gappify.com/v1/invoices/source-system-id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```