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

# Create invoice

POST https://api.propexo.com/v1/invoices/
Content-Type: application/json

Create an invoice for an integration.

Reference: https://docs.propexo.com/api-reference/pms-generic-ap-is/invoices/create-invoice

## Authentication

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

## Servers

- `https://api.propexo.com` (Production, default)
- `https://api.sandbox.propexo.com` (Sandbox)

## Request

### Body (application/json)

This endpoint expects a _v1_invoices__post_input.

- `integration_id` (string, required)
- `vendor_id` (string, optional) — The Propexo unique identifier for the vendor
- `invoice_date` (string, optional) — The date of issuance for the invoice
- `due_date` (string, optional) — The due date associated with the invoice
- `invoice_items` (list of V1InvoicesPostInputInvoiceItemsItems, optional)
- `description` (string, optional) — Description of the invoice
- `invoice_number` (string, optional) — The invoice or reference number that the vendor assigned to the service request
- `service_request_id` (string, optional) — The Propexo unique identifier for the service request
- `vendor_location_id` (string, optional) — The Propexo unique identifier for the vendor location
- `total_amount_in_cents` (double, optional) — The amount of the invoice, in cents
- `ap_financial_account_id` (string, optional) — The Propexo unique identifier for the financial account. You'll likely want to work with your customer to know what value is appropriate here.
- `post_month` (V1InvoicesPostInputPostMonth, optional) — The post month for the invoice. We will strip all data out of the datetime except the year and month.
- `discount_amount_in_cents` (double, optional) — The discount, in cents, of the invoice. This amount will be applied prior to the total amount being calculated.
- `notes` (string, optional) — Notes associated with the invoice
- `attachments` (list of V1InvoicesPostInputAttachmentsItems, optional) — Files to upload for the invoice. All the files can have a maximum combined file size of 50 MB
- `partner_name` (string, optional) — The name of your integration with MRI
- `scanned_copy_url` (string, optional) — The URL assigned to the copy of the original invoice that was imported from a third-party system
- `purchase_order_number` (string, optional) — Set this parameter to the purchase order number that contains the line items to be invoiced. MRI will validate and link the invoice to the specified purchase order for processing.
- `separate_check` (boolean, optional) — Whether to group the invoice payment on the same check with other invoices or pay the invoice separately on its own check
- `location_id` (string, optional) — The Propexo unique identifier for the location
- `post_date` (V1InvoicesPostInputPostDate, optional) — The post date for the invoice.
- `property_id` (string, optional) — The Propexo unique identifier for the property
- `accounting_date` (V1InvoicesPostInputAccountingDate, optional) — The accounting date of the invoice. If this isn't provided, ResMan defaults this to the invoice date.
- `memo` (string, optional) — Memo of the invoice
- `cash_financial_account_id` (string, optional) — The Propexo unique identifier for the financial account. You'll likely want to work with your customer to know what value is appropriate here.
- `expense_type` (string, optional) — The expense type of the invoice. You'll have to request this data from your customer
- `display_type` (string, optional) — The display type of the invoice. You'll have to request this data from your customer

## Response

### 200

Successful response

- `job_id` (string, required) — The ID of the job created to handle this operation
- `data` (V1InvoicesPostOutputData, required)

## Errors

### 400 Bad Request Error

Bad Request

- `error` (ErrorResponseError, required)

## Types

### V1InvoicesPostInputInvoiceItemsItems

- `property_id` (string, required) — The Propexo unique identifier for the property
- `financial_account_id` (string, required) — The Propexo unique identifier for the financial account
- `total_amount_in_cents` (double, required) — The amount of the invoice item, in cents
- `notes` (string, required) — Notes associated with the invoice item

### V1InvoicesPostInputPostMonth

The post month for the invoice. We will strip all data out of the datetime except the year and month.

### V1InvoicesPostInputAttachmentsItems

- `file_data` (string, required) — The contents of the file, as a base64 encoded string. The PMS has a max file size of 50 MB.
- `file_name` (string, required) — The name of the file including the extension. Ex: "image.jpg"
- `mime_type` (string, required) — The mime type of the file. Ex: "image/jpeg"

### V1InvoicesPostInputPostDate

The post date for the invoice.

### V1InvoicesPostInputAccountingDate

The accounting date of the invoice. If this isn't provided, ResMan defaults this to the invoice date.

### V1InvoicesPostOutputData

### ErrorResponseError

- `code` (string, required)
- `message` (string, required)
- `details` (map from string to any, optional)

## Examples

**Request**

```json
{
  "integration_id": "intg_9f8b7c6d5e4a3b2c1d0e"
}
```

**Response**

```json
{
  "job_id": "job_123e4567-e89b-12d3-a456-426614174000",
  "data": {}
}
```

**SDK Code**

```python
import requests

url = "https://api.propexo.com/v1/invoices/"

payload = { "integration_id": "intg_9f8b7c6d5e4a3b2c1d0e" }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.propexo.com/v1/invoices/';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"integration_id":"intg_9f8b7c6d5e4a3b2c1d0e"}'
};

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"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.propexo.com/v1/invoices/"

	payload := strings.NewReader("{\n  \"integration_id\": \"intg_9f8b7c6d5e4a3b2c1d0e\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	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.propexo.com/v1/invoices/")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"integration_id\": \"intg_9f8b7c6d5e4a3b2c1d0e\"\n}"

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.post("https://api.propexo.com/v1/invoices/")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"integration_id\": \"intg_9f8b7c6d5e4a3b2c1d0e\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.propexo.com/v1/invoices/', [
  'body' => '{
  "integration_id": "intg_9f8b7c6d5e4a3b2c1d0e"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.propexo.com/v1/invoices/");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"integration_id\": \"intg_9f8b7c6d5e4a3b2c1d0e\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["integration_id": "intg_9f8b7c6d5e4a3b2c1d0e"] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.propexo.com/v1/invoices/")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```