# Get started with the Spend API

> Status: Beta

> Authenticate, set permissions, and call Spend API endpoints to access Spend data in Rippling.

## Overview

> **Note:**
> Use of the Spend APIs requires the **Spend Management Platform API** entitlement. Work with your company Account Manager for access.

Spend APIs read/update bills, card transactions, reimbursements, finance vendors, and finance categories from Rippling's Spend Management product. This data can be used to power automations, inform analytics, and define policies.

### Core concepts

-   **Bill**: A vendor bill, including invoice and payment details.
-   **Card transaction**: A posted card charge or a pending authorization.
-   **Reimbursement**: An expense reimbursement, including mileage and per diem.
-   **Finance vendor**: A vendor in the company's finance directory. Archived vendors remain available so historical transactions can still resolve their vendor.
-   **Finance category**: A category used to classify transaction line items. Inactive categories remain available for historical references.

### Available endpoints

| API endpoint | Required scopes | Schema | Notes / Requirements |
| --- | --- | --- | --- |
| [GET List bills](https://developer.rippling.com/documentation/rest-api/reference/list-bills) | -   `bills.read` | -   `BillPayment`<br>-   `RedactedFields` | -   Expandable fields: `worker`, `vendor`, `submitter`. |
| [GET Retrieve a specific bill](https://developer.rippling.com/documentation/rest-api/reference/get-bills) | -   `bills.read` | -   `BillPayment`<br>-   `MetaResponse` | -   Requires an `id` from [GET List bills](https://developer.rippling.com/documentation/rest-api/reference/list-bills). |
| [PATCH Update a bill](https://developer.rippling.com/documentation/rest-api/reference/update-bills) | -   `bills.read-write` | -   `BillPayment` | -   Requires an `id` from [GET List bills](https://developer.rippling.com/documentation/rest-api/reference/list-bills).<br>-   Send `line_items` as the full list. Line amounts must add up to the bill's merchant amount. |
| [GET List card transactions](https://developer.rippling.com/documentation/rest-api/reference/list-card-transactions) | -   `card-transactions.read` | -   `CardTransaction`<br>-   `RedactedFields` | -   Expandable fields: `worker`, `vendor`. |
| [GET Retrieve a specific card transaction](https://developer.rippling.com/documentation/rest-api/reference/get-card-transactions) | -   `card-transactions.read` | -   `CardTransaction`<br>-   `MetaResponse` | -   Requires an `id` from [GET List card transactions](https://developer.rippling.com/documentation/rest-api/reference/list-card-transactions). |
| [PATCH Update a card transaction](https://developer.rippling.com/documentation/rest-api/reference/update-card-transactions) | -   `card-transactions.read-write` | -   `CardTransaction` | -   Requires an `id` from [GET List card transactions](https://developer.rippling.com/documentation/rest-api/reference/list-card-transactions).<br>-   Send `line_items` as the full list. Line amounts must add up to the transaction's merchant amount. |
| [POST Upload a receipt to a card transaction](https://developer.rippling.com/documentation/rest-api/reference/upload-receipt-card-transactions) | -   `card-transactions.read-write` | -   `CardTransaction` | -   Requires an `id` from [GET List card transactions](https://developer.rippling.com/documentation/rest-api/reference/list-card-transactions).<br>-   Send the receipt as `multipart/form-data` in a `file` field. |
| [GET List reimbursements](https://developer.rippling.com/documentation/rest-api/reference/list-reimbursements) | -   `reimbursements.read` | -   `ExpenseRequest`<br>-   `RedactedFields` | -   Expandable fields: `worker`, `vendor`, `mileage_rate`, `per_diem_rate`. |
| [GET Retrieve a specific reimbursement](https://developer.rippling.com/documentation/rest-api/reference/get-reimbursements) | -   `reimbursements.read` | -   `ExpenseRequest`<br>-   `MetaResponse` | -   Requires an `id` from [GET List reimbursements](https://developer.rippling.com/documentation/rest-api/reference/list-reimbursements). |
| [PATCH Update a reimbursement](https://developer.rippling.com/documentation/rest-api/reference/update-reimbursements) | -   `reimbursements.read-write` | -   `ExpenseRequest` | -   Requires an `id` from [GET List reimbursements](https://developer.rippling.com/documentation/rest-api/reference/list-reimbursements).<br>-   Send `line_items` as the full list. Per-diem line items cannot be updated. A mileage reimbursement must have exactly one line item. |
| [POST Upload a receipt to a reimbursement](https://developer.rippling.com/documentation/rest-api/reference/upload-receipt-reimbursements) | -   `reimbursements.read-write` | -   `ExpenseRequest` | -   Requires an `id` from [GET List reimbursements](https://developer.rippling.com/documentation/rest-api/reference/list-reimbursements).<br>-   Send the receipt as `multipart/form-data` in a `file` field. Paid, finalized, or failed reimbursements cannot be changed. |
| [GET List finance vendors](https://developer.rippling.com/documentation/rest-api/reference/list-finance-vendors) | -   `finance-vendors.read` | -   `VendorResource`<br>-   `RedactedFields` |  |
| [GET Retrieve a specific finance vendor](https://developer.rippling.com/documentation/rest-api/reference/get-finance-vendors) | -   `finance-vendors.read` | -   `VendorResource`<br>-   `MetaResponse` | -   Requires an `id` from [GET List finance vendors](https://developer.rippling.com/documentation/rest-api/reference/list-finance-vendors). |
| [GET List finance categories](https://developer.rippling.com/documentation/rest-api/reference/list-finance-categories) | -   `finance-categories.read` | -   `Category`<br>-   `RedactedFields` |  |
| [GET Retrieve a specific finance category](https://developer.rippling.com/documentation/rest-api/reference/get-finance-categories) | -   `finance-categories.read` | -   `Category`<br>-   `MetaResponse` | -   Requires an `id` from [GET List finance categories](https://developer.rippling.com/documentation/rest-api/reference/list-finance-categories). |

* * *

## Permissions & scopes

Rippling's V2 API uses a permissions-based access model. The data returned by an endpoint depends on:

-   The permission profile of the user who creates the API token. This includes the **permission scope** (e.g., _“The entire company”_ vs. _“Direct reports only”_) and **employment data access level** (e.g., _“View and edit all sensitive data”_ vs. _“View all basic personal”_).
-   The scopes selected when the token is created.

The **Required Scopes** for each endpoint are listed in the API reference documentation.

#### Example

![Spend Getting Started](https://developer.rippling.com/assets/images/gettingstartedguide2-7b37a3b054c1a404fb1af488fb2a1a49.png)

For more information on managing access using API tokens and permission profiles, see [API Tokens and Permissions](https://developer.rippling.com/documentation/rest-api/essentials/api-tokens).

* * *

## Call the API

To call a Spend API endpoint:

1.  Verify the user’s permission profile and ensure they have the permissions required to access the desired data.

> **Note:**
> If the user’s permissions are limited (for example, _“Basic personal data for direct reports only”_):
>
> -   Some scopes will not be available when creating the API token.
> -   The API response will return limited data.

2.  Create an API token in the [Developer app](https://app.rippling.com/api-tokens/tokens) with the required scopes.
3.  Call the endpoint using the generated token.

Some endpoints require a specific resource ID (for example, a `worker_id`). In these cases, call the corresponding list endpoint first to fetch the ID (e.g. call GET List workers before calling GET Retrieve a specific worker).

### Example: GET List finance vendors

_Request:_

```text
curl -L -X GET 'https://rest.ripplingapis.com/finance-vendors/' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer REDACTED'
```

_Response:_

```text
{
  "results": [
    {
      "id": "66a43405af71f094991bf94f",
      "created_at": "2024-07-26T23:41:12.243000+00:00",
      "updated_at": "2024-07-27T10:37:57.891000+00:00",
      "name": "Northwind Supplies",
      "logo": null,
      "is_archived": false
    }
  ],
  "next_link": null
}
```

Source: https://developer.rippling.com/documentation/rest-api/guides/spend-getting-started

> For the complete documentation index, see [llms.txt](https://developer.rippling.com/llms.txt). Public pages have a Markdown version at the same URL with .md added.
