# Spendesk

> Read spending, suppliers, requests, cards and purchase orders, and create or update suppliers.

App · 25 actions. Web page: https://docs.lodol.com/docs/integrations/spendesk

## Actions

### Create suppliers

Create suppliers.

**Inputs**

- Records (`records`, list, required): Records to send, using the documented structure.

**Outputs**

- `data` (object): Data.
- `has_more` (true/false): Has more.
- `next_cursor` (text): Next cursor.

**Example output**

```json
{
  "data": {
    "item": {
      "companyId": "example",
      "id": "example",
      "name": "example",
      "primaryEmail": "example"
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get a Card

Get a Card. Returns the full service response for the connected account.

**Inputs**

- Card (`card_id`, text, required): The ID of the card to retrieve.

**Outputs**

- `data` (object): Data.
- `has_more` (true/false): Has more.
- `next_cursor` (text): Next cursor.

**Example output**

```json
{
  "data": {
    "data": {
      "availableBalance": 1,
      "blockingReason": {
        "createdAt": "example",
        "firstName": "example",
        "initiator": "user",
        "lastName": "example",
        "userId": "example"
      },
      "cardOrder": {
        "cardId": "example",
        "city": "example",
        "consideredAsLost": true,
        "country": "example",
        "createdAt": "example",
        "estimatedReceivedAt": "example",
        "id": "example",
        "receivedAt": "example",
        "shippedAt": "example",
        "state": "to_pickup",
        "trackingLink": "example"
      },
      "company": {
        "id": "example",
        "label": "example"
      },
      "costCenter": {
        "id": "example",
        "label": "example"
      },
      "createdAt": "example",
      "currency": "example",
      "expiryDate": "example",
      "id": "example",
      "lastFourDigits": "example",
      "lastSuccessfulPaymentTime": "example",
      "multiUseCardExpiryDate": "example",
      "owner": {
        "id": "example",
        "label": "example"
      },
      "recurrence": "MONTHLY",
      "request": {
        "amount": 1,
        "currency": "example",
        "id": "example",
        "label": "example"
      },
      "spendingLimit": 1,
      "status": "example",
      "subscriptionBudget": {
        "availableAmount": 1,
        "budgetAmount": 1,
        "currency": "example",
        "spentAmount": 1,
        "spentPercent": 1
      },
      "supplier": {
        "id": "example",
        "label": "example"
      },
      "type": "example"
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get a purchase order by ID

Get a purchase order by ID. Returns the full service response for the connected account.

**Inputs**

- With items (`with_items`, true/false): Whether to include line items in the response
- Purchase order (`purchase_order_id`, text, required): The ID of the purchase order to retrieve

**Outputs**

- `data` (object): Data.
- `has_more` (true/false): Has more.
- `next_cursor` (text): Next cursor.

**Example output**

```json
{
  "data": {
    "data": {
      "amount": {
        "amount": 1,
        "currency": "example",
        "precision": 1
      },
      "billedAmount": {
        "amount": 1,
        "currency": "example",
        "precision": 1
      },
      "billing": "example",
      "billingOverDeliveryStatus": "example",
      "billingStatus": "example",
      "companyId": "example",
      "costCenterId": "example",
      "customFields": [],
      "deliveredAmount": {
        "amount": 1,
        "currency": "example",
        "precision": 1
      },
      "deliveryStatus": "example",
      "description": "example",
      "endDate": "example",
      "id": "example",
      "invoices": [],
      "items": [],
      "netAmount": {
        "amount": 1,
        "currency": "example",
        "precision": 1
      },
      "purchaseOrderNumber": 1,
      "requestId": "example",
      "requesterId": "example",
      "spendingCommitmentId": "example",
      "startDate": "example",
      "status": "open",
      "supplierId": "example",
      "teamId": "example",
      "version": 1
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get a Request

Get a Request. Returns the full service response for the connected account.

**Inputs**

- With approval (`with_approval`, true/false): Include the `approval` object on the returned request.
- Request (`request_id`, text, required): The ID of the request to retrieve.

**Outputs**

- `data` (object): Data.
- `has_more` (true/false): Has more.
- `next_cursor` (text): Next cursor.

**Example output**

```json
{
  "data": {
    "data": {
      "amountToReimburse": {
        "amount": 1,
        "currency": "example",
        "precision": 1
      },
      "appUrl": "example",
      "approval": {
        "autoApprovalReason": "example",
        "isAutoApproved": true,
        "steps": []
      },
      "cardLoadRequestData": {
        "amount": 1,
        "availableAfter": 1,
        "availableBefore": 1,
        "byUserId": "example",
        "cardId": "example",
        "companyId": "example",
        "createdAt": "example",
        "deletedAt": "example",
        "description": "example",
        "id": "example",
        "organisationId": "example",
        "requestId": "example",
        "updatedAt": "example"
      },
      "companyId": "example",
      "controllerReview": {
        "at": "example",
        "byUserId": "example",
        "decision": "validated",
        "reason": "example"
      },
      "costCentreId": "example",
      "createdAt": "example",
      "creditNoteRequestData": {
        "creditNoteNumber": "example",
        "invoiceId": "example"
      },
      "currency": "example",
      "description": "example",
      "expenseDate": "example",
      "id": "example",
      "invoiceRequestData": {
        "dueDate": "example",
        "invoiceId": "example",
        "invoiceNumber": "example"
      },
      "mileageAllowanceRequestData": {
        "distance": 1,
        "distanceUnit": "km"
      },
      "multiUseCardEndDateChangeRequestData": {
        "companyId": "example",
        "id": "example",
        "multiUseCardId": "example",
        "newEndDate": "example",
        "previousEndDate": "example",
        "requestId": "example"
      },
      "multiUseCardTopUpRequestData": {
        "companyId": "example",
        "id": "example",
        "multiUseCardId": "example",
        "previousAmount": 1,
        "requestId": "example"
      },
      "perDiemAllowanceRequestData": {
        "days": 1
      },
      "purchaseOrderRequestData": {
        "endDate": "example",
        "netAmount": {
          "amount": 1,
          "currency": "example",
          "precision": 1
        },
        "purchaseOrderId": "example",
        "startDate": "example"
      },
      "requestedAmount": 1,
      "requesterId": "example",
      "state": "example",
      "subscriptionIncreaseRequestData": {
        "subscriptionId": "example"
      },
      "supplierId": "example",
      "teamId": "example",
      "type": "single_purchase"
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get Analytical Fields

Get Analytical Fields. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Page (`page`, number): Page number. At least 1.
- Page size (`page_size`, number): Page size. From 1 to 30.
- Include archived (`include_archived`, true/false): Include deleted fields
- Ids (`ids`, list): Field IDs, exploded `(ids=1&ids=2)`

**Outputs**

- `data` (object): Data.
- `has_more` (true/false): Has more.
- `next_cursor` (text): Next cursor.

**Example output**

```json
{
  "data": {
    "data": [],
    "meta": {
      "pagination": {
        "page": 1,
        "pageSize": 1,
        "total": 1
      }
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get Analytical Values

Get Analytical Values. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Page (`page`, number): Page number. At least 1.
- Page size (`page_size`, number): Page size. From 1 to 30.
- Include archived (`include_archived`, true/false): Include archived values (retained for historical payables, not deleted)
- Field ID (`field_id`, text, required): Analytical field ID

**Outputs**

- `data` (object): Data.
- `has_more` (true/false): Has more.
- `next_cursor` (text): Next cursor.

**Example output**

```json
{
  "data": {
    "data": [],
    "meta": {
      "pagination": {
        "page": 1,
        "pageSize": 1,
        "total": 1
      }
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get Bank Fees

Get Bank Fees. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Page (`page`, number): Page number. At least 1.
- Page size (`page_size`, number): Page size. From 1 to 30.
- From (`from_value`, date and time): Start date of the requested period, with timezone offset (`Z` for UTC).
- To (`to`, date and time): End date of the requested period, with timezone offset (`Z` for UTC).
- Settlement IDs (`settlement_ids`, list): An array of settlement IDs, exploded `(settlementIds=1&settlementIds=2)`.

**Outputs**

- `data` (object): Data.
- `has_more` (true/false): Has more.
- `next_cursor` (text): Next cursor.

**Example output**

```json
{
  "data": {
    "data": [],
    "meta": {
      "pagination": {
        "page": 1,
        "pageSize": 1,
        "total": 1
      }
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get Cards

Get Cards. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Page (`page`, number): Page number. At least 1.
- Page size (`page_size`, number): Page size. From 1 to 30.
- Type (`type`, text): Filter by card type. One of: `single_purchase`, `subscription`, `physical`, `multi_use`.
- Status (`status`, text): Filter by card status label, case-sensitive: `Active`, `Blocked`, `New`, `Ready`, `Pre-activated`, `Hidden`, `Unknown` or `Aborted`. The legacy raw code (for example `ACT` or `BLO`) also matches. Lost, stolen, damaged, expired and cancelled cards are never listed, so filtering on those statuses returns no cards.
- App user (`app_user_id`, text): Filter by card owner user ID.
- Created after (`created_after`, date and time): Return cards created on or after this date (YYYY-MM-DD, UTC).
- Created before (`created_before`, date and time): Return cards created on or before this date (YYYY-MM-DD, UTC).

**Outputs**

- `data` (object): Data.
- `has_more` (true/false): Has more.
- `next_cursor` (text): Next cursor.

**Example output**

```json
{
  "data": {
    "data": [],
    "meta": {
      "pagination": {
        "page": 1,
        "pageSize": 1,
        "total": 1
      }
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get Cost Centers

Get Cost Centers. Returns the full service response for the connected account.

**Inputs**

- Ids (`ids`, list): Cost center IDs to filter by.
- Include archived (`include_archived`, true/false): Whether to include archived cost centers in the response. Defaults to `false`.

**Outputs**

- `data` (object): Data.
- `has_more` (true/false): Has more.
- `next_cursor` (text): Next cursor.

**Example output**

```json
{
  "data": {
    "data": []
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get Expense Categories

Get Expense Categories. Returns the full service response for the connected account.

**Inputs**

- Ids (`ids`, list): Expense category IDs to filter by.

**Outputs**

- `data` (object): Data.
- `has_more` (true/false): Has more.
- `next_cursor` (text): Next cursor.

**Example output**

```json
{
  "data": {
    "data": []
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get Failed Transactions

Get Failed Transactions. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Start date (`start_date`, date): Return transactions on or after this date (YYYY-MM-DD).
- End date (`end_date`, date): Return transactions on or before this date (YYYY-MM-DD), inclusive of the full day.
- App user (`app_user_id`, text): Filter by user ID.
- Card (`card_id`, text): Filter by card ID.

**Outputs**

- `data` (object): Data.
- `has_more` (true/false): Has more.
- `next_cursor` (text): Next cursor.

**Example output**

```json
{
  "data": {
    "data": [],
    "meta": null
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get Payable Attachments

Get Payable Attachments. Returns the full service response for the connected account.

**Inputs**

- Payable ID (`payable_id`, text, required): The ID of the Payable

**Outputs**

- `data` (object): Data.
- `has_more` (true/false): Has more.
- `next_cursor` (text): Next cursor.

**Example output**

```json
{
  "data": {
    "data": []
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get Payable by ID

Get Payable by ID. Returns the full service response for the connected account.

**Inputs**

- Id (`id`, text, required): ID of the payable to retrieve.

**Outputs**

- `data` (object): A payable is a short-term liability owed by a company to its creditors (suppliers or employees). Several types of payables are supported by Spendesk, e.g. Invoices, Credit Notes, Expense Claims, Physical card purchases, Single Use card purchases, Subscription card purchases, etc.
- `has_more` (true/false): Has more.
- `next_cursor` (text): Next cursor.

**Example output**

```json
{
  "data": {
    "accountingDate": "example",
    "allocations": [],
    "amortisation": {
      "date": {
        "from": "example",
        "to": "example"
      }
    },
    "amount": 1,
    "analyticalProperties": [],
    "appUrl": "example",
    "bookkeepingStatus": "created",
    "commitmentCounterparty": {
      "name": "example",
      "type": "supplier"
    },
    "companyId": "example",
    "costCenterId": "example",
    "costCenterName": "example",
    "counterparty": {
      "accountPayable": {
        "auxiliaryAccountCode": "example",
        "generalAccountCode": "example",
        "id": "example"
      },
      "id": "example",
      "name": "example",
      "type": "supplier"
    },
    "createdAt": "example",
    "creditNoteNumber": "example",
    "currency": "example",
    "description": "example",
    "exportedAt": "example",
    "functionalAmount": 1,
    "functionalCurrency": "example",
    "functionalExchangeRate": 1,
    "id": "example",
    "invoiceDueDate": "example",
    "invoiceNumber": "example",
    "lineItems": [],
    "outstandingAmount": 1,
    "outstandingFunctionalAmount": 1,
    "payableDate": "example",
    "purchaseOrderNumber": "example",
    "referenceInvoiceNumber": "example",
    "teamId": "example",
    "teamName": "example",
    "type": "expenseClaim",
    "userId": "example",
    "version": 1
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get Purchase Orders

Get Purchase Orders. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Page (`page`, number): Page number. At least 1.
- Page size (`page_size`, number): Page size. From 1 to 30.
- With items (`with_items`, true/false): Whether to include line items in the response
- Supplier IDs (`supplier_ids`, text): Filter by supplier IDs
- Status (`status`, text): Filter by purchase order status. One of: `open`, `closed`, `cancelled`.
- Company IDs (`company_ids`, text): Filter by company IDs
- Created from (`created_from`, date and time): Filter purchase orders created from this date (YYYY-MM-DD)
- Created to (`created_to`, date and time): Filter purchase orders created until this date (YYYY-MM-DD)
- Start date from (`start_date_from`, date): Filter purchase orders with start date from this date (YYYY-MM-DD)
- Start date to (`start_date_to`, date): Filter purchase orders with start date until this date (YYYY-MM-DD)
- End date from (`end_date_from`, date): Filter purchase orders with end date from this date (YYYY-MM-DD)
- End date to (`end_date_to`, date): Filter purchase orders with end date until this date (YYYY-MM-DD)

**Outputs**

- `data` (object): Data.
- `has_more` (true/false): Has more.
- `next_cursor` (text): Next cursor.

**Example output**

```json
{
  "data": {
    "data": [],
    "meta": {
      "pagination": {
        "page": 1,
        "pageSize": 1,
        "total": 1
      }
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get Requests

Get Requests. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Page (`page`, number): Page number. At least 1.
- Page size (`page_size`, number): Page size. From 1 to 30.
- Type (`type`, text): Filter by request type. Without it, every listed type except `subscription_increase`, `purchase_order`, `invoice` and `credit_note` is returned. One of: `single_purchase`, `subscription`, `subscription_increase`, `multi_use_card`, `multi_use_card_top_up`, `multi_use_card_end_date_change`, `card_load`, `purchase_order`, `invoice`, `credit_note`, and 3 more.
- State (`state`, text): Filter by request state. One of: `pending`, `approved`, `refused`, `expired`, `cancelled`, `incomplete`, `draft`, `rejected_by_controller`, `supplier_disputed`.
- Reviewed (`reviewed`, true/false): Filters claims (`expense`, `mileage_allowance`, `per_diem_allowance`) only, so combine it with a claim `type`: other types never match it. `true` keeps the claims a controller reviewed, `false` the others. The claims feature is required.
- Requester ID (`requester_id`, text): Filter by requester user ID.
- Supplier (`supplier_id`, text): Filter by supplier ID.
- Created after (`created_after`, date and time): Return requests created on or after this date (YYYY-MM-DD, UTC).
- Created before (`created_before`, date and time): Return requests created on or before this date (YYYY-MM-DD, UTC).
- Min amount (`min_amount`, number): Filter by minimum requested amount, in major units. Compared against the request's amount converted to the company's functional currency using stored exchange rates.
- Max amount (`max_amount`, number): Filter by maximum requested amount, in major units. Compared against the request's amount converted to the company's functional currency using stored exchange rates.
- With approval (`with_approval`, true/false): Include the `approval` object on each returned request. Off by default because resolving the approval chain costs an extra lookup per page.

**Outputs**

- `data` (object): Data.
- `has_more` (true/false): Has more.
- `next_cursor` (text): Next cursor.

**Example output**

```json
{
  "data": {
    "data": [],
    "meta": {
      "pagination": {
        "page": 1,
        "pageSize": 1,
        "total": 1
      }
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get Settlements

Get Settlements. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Page (`page`, number): Page number. At least 1.
- Page size (`page_size`, number): Page size. From 1 to 30.
- Exported after (`exported_after`, date and time): The date and time the settlement first got exported to accounting, with timezone offset (use `Z` for UTC).
- Exported before (`exported_before`, date and time): The date and time before which the settlement was first exported to accounting, with timezone offset (use `Z` for UTC).
- Paid from (`paid_from`, list): Payment account used for the settlement. Card settlements are always `spendeskAccount`; `externalAccount` matches only wire transfers emitted from an external bank account. One or more of: `externalAccount`, `spendeskAccount`.
- Ids (`ids`, list): An array of settlement IDs, exploded `(ids=1&ids=2)`.
- State (`state`, list): state. One or more of: `created`, `exported`, `failedToExport`.
- Types (`types`, list): Filter settlements by type. One or more of: `payment`, `refund`, `advance`, `cashReturn`, `chargeback`, `reimbursement`.
- Cleared from (`cleared_from`, date and time): String containing a date expressed in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format like `2023-05-12`.
- Cleared to (`cleared_to`, date and time): String containing a date expressed in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format like `2023-05-12`.
- Supplier (`supplier_id`, text): The ID of the supplier to filter settlements by.
- Transaction description (`transaction_description`, text): Filter settlements by transaction description.

**Outputs**

- `data` (object): Data.
- `has_more` (true/false): Has more.
- `next_cursor` (text): Next cursor.

**Example output**

```json
{
  "data": {
    "data": [],
    "meta": {
      "pagination": {
        "page": 1,
        "pageSize": 1,
        "total": 1
      }
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get Successful Transactions

Get Successful Transactions. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Page (`page`, number): Page number. At least 1.
- Page size (`page_size`, number): Page size. From 1 to 30.
- Start date (`start_date`, date): Return transactions on or after this date (YYYY-MM-DD). Filters on the payment settlement date (returned as createdAt).
- End date (`end_date`, date): Return transactions on or before this date (YYYY-MM-DD), inclusive of the full day. Filters on the payment settlement date (returned as createdAt).
- App user (`app_user_id`, text): Filter by user ID.
- Card (`card_id`, text): Filter by card ID.

**Outputs**

- `data` (object): Data.
- `has_more` (true/false): Has more.
- `next_cursor` (text): Next cursor.

**Example output**

```json
{
  "data": {
    "data": [],
    "meta": {
      "pagination": {
        "page": 1,
        "pageSize": 1,
        "total": 1
      }
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get Supplier By Id

Get Supplier By Id. Returns the full service response for the connected account.

**Inputs**

- Include (`include`, list): Extra data to embed in the response. One or more of: `externalIds`.
- Id (`id`, text, required): ID of the supplier to retrieve.

**Outputs**

- `data` (object): Data.
- `has_more` (true/false): Has more.
- `next_cursor` (text): Next cursor.

**Example output**

```json
{
  "data": {
    "accountPayable": {
      "auxiliaryAccountCode": "example",
      "externalId": "example",
      "generalAccountCode": "example",
      "id": "example"
    },
    "address": {
      "city": "example",
      "country": "example",
      "line1": "example",
      "line2": "example",
      "postalCode": "example",
      "stateOrCounty": "example"
    },
    "bankCountry": "example",
    "bankDetailsUpdatedAt": "example",
    "bankDetailsUpdatedBy": "example",
    "bankInfo": {
      "accountHolderName": "example",
      "accountNumber": "example",
      "bankCountry": "example",
      "bic": "example",
      "iban": "example",
      "routingNumber": "example",
      "sortCode": "example"
    },
    "bic": "example",
    "createdAt": "example",
    "createdBy": "example",
    "externalIds": [],
    "iban": "example",
    "id": "example",
    "isArchived": true,
    "legalName": "example",
    "name": "example",
    "registrationNo": "example",
    "updatedAt": "example",
    "updatedBy": "example",
    "vatNo": "example"
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get Suppliers

Get Suppliers. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Page (`page`, number): Page number. At least 1.
- Page size (`page_size`, number): Page size. From 1 to 30.
- Ids (`ids`, list): Supplier IDs to filter by.
- Search (`search`, text): Free-text supplier search, for example by supplier name.
- Updated before (`updated_before`, date and time): String containing a UTC datetime expressed in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format like `2023-05-12T14:06:40Z`.
- Updated after (`updated_after`, date and time): String containing a UTC datetime expressed in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format like `2023-05-12T14:06:40Z`.
- Created before (`created_before`, date and time): String containing a UTC datetime expressed in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format like `2023-05-12T14:06:40Z`.
- Created after (`created_after`, date and time): String containing a UTC datetime expressed in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format like `2023-05-12T14:06:40Z`.
- Bank country (`bank_country`, text): ISO alpha-2 code of the bank country
- Iban (`iban`, text): Supplier IBAN
- Vat number (`vat_number`, text): Supplier VAT number
- Is archived (`is_archived`, text): Selects one archive state and is not additive: true returns ONLY archived suppliers, false ONLY active ones. Omit it to get both , every row carries isArchived. One of: `true`, `false`.
- External IDs (`external_ids`, list): Return only suppliers carrying one of these IDs in an external system (ERP). Resolved against the external-reference registry, so unmapped suppliers are excluded. Up to 50 per request.
- Provider (`provider`, text): Restrict the `externalIds` filter to one external system (e.g. Netsuite, Xero). Worth setting when a company has been connected to more than one ERP, since the same external ID string can exist in each. Ignored without that filter, and it does not narrow the `externalIds` include, which returns the IDs from every system (read `provider` on each entry).
- Include (`include`, list): Extra data to embed in the response. `externalIds` costs one additional lookup per request, so it is opt-in. One or more of: `externalIds`.
- Sort by (`sort_by`, text): Field to sort suppliers by. One of: `name`, `created_at`, `updated_at`.
- Sort (`sort`, text): Sort direction. One of: `asc`, `desc`.

**Outputs**

- `data` (object): Data.
- `has_more` (true/false): Has more.
- `next_cursor` (text): Next cursor.

**Example output**

```json
{
  "data": {
    "data": [],
    "meta": {
      "pagination": {
        "page": 1,
        "pageSize": 1,
        "total": 1
      }
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get User By Id

Get User By Id. Returns the full service response for the connected account.

**Inputs**

- Id (`id`, text, required): ID of the user to retrieve.

**Outputs**

- `data` (object): Data.
- `has_more` (true/false): Has more.
- `next_cursor` (text): Next cursor.

**Example output**

```json
{
  "data": {
    "companyId": "example",
    "email": "example",
    "firstName": "example",
    "id": "example",
    "lastName": "example",
    "status": "active"
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get Users

Get Users. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Page (`page`, number): Page number. At least 1.
- Page size (`page_size`, number): Page size. From 1 to 30.
- Ids (`ids`, list): User IDs to filter by.
- Status (`status`, text): The user status to filter for. One of: `active`, `archived`, `pending`.

**Outputs**

- `data` (object): Data.
- `has_more` (true/false): Has more.
- `next_cursor` (text): Next cursor.

**Example output**

```json
{
  "data": {
    "data": [],
    "meta": {
      "pagination": {
        "page": 1,
        "pageSize": 1,
        "total": 1
      }
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get Wallet Loads

Get Wallet Loads. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Page (`page`, number): Page number. At least 1.
- Page size (`page_size`, number): Page size. From 1 to 30.
- From (`from_value`, date and time): Start date of the requested period, with timezone offset (`Z` for UTC).
- To (`to`, date and time): End date of the requested period, with timezone offset (`Z` for UTC).
- Cursor (`cursor`, text): GBP wallets only: `meta.pagination.nextCursor` from the previous page.

**Outputs**

- `data` (object): Data.
- `has_more` (true/false): Has more.
- `next_cursor` (text): Next cursor.

**Example output**

```json
{
  "data": {
    "data": [],
    "meta": {
      "pagination": {
        "hasNextPage": true,
        "nextCursor": "example",
        "nextUrl": "example",
        "page": 1,
        "pageSize": 1,
        "total": 1
      }
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get Wallet Summary

Get Wallet Summary. Returns the full service response for the connected account.

**Inputs**: None.

**Outputs**

- `data` (object): Data.
- `has_more` (true/false): Has more.
- `next_cursor` (text): Next cursor.

**Example output**

```json
{
  "data": {
    "allocatedOnCards": {
      "physicalAmount": 1,
      "singlePurchaseAmount": 1,
      "subscriptionAmount": 1,
      "totalAllocatedAmount": 1
    },
    "currency": "example",
    "id": "example",
    "name": "example",
    "scheduledTransfersAmount": {
      "scheduledExpenseClaimsAmount": 1,
      "scheduledInvoicesAmount": 1,
      "totalScheduledTransferAmount": 1
    },
    "status": "active",
    "totalAllocatedAmount": 1,
    "totalAmount": 1,
    "totalAvailableAmount": 1
  },
  "has_more": false,
  "next_cursor": null
}
```

### Search Payables

Search Payables. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Filters (`filters`, object): Additional structured filters. Use the documented fields.
- Limit (`limit`, number): Maximum number of payables to return per page, from 1 to 1000. Defaults to 1000. From 1 to 1000.
- Cursor (`cursor`, text): Opaque pagination cursor returned in the previous response’s nextCursor field. Omit for the first page.
- Sort (`sort`, text): Sort order by creation date. Defaults to ascending. One of: `asc`, `desc`.

**Outputs**

- `data` (object): Data.
- `has_more` (true/false): Has more.
- `next_cursor` (text): Next cursor.

**Example output**

```json
{
  "data": {
    "nextCursor": null,
    "payables": [],
    "referencesToRetry": []
  },
  "has_more": false,
  "next_cursor": null
}
```

### Update Supplier

Update Supplier. Empty fields keep their current values.

**Inputs**

- Id (`id`, text, required): ID of the supplier to update.
- Name (`name`, text): The name of the supplier.
- Primary email (`primary_email`, text): The primary email of the supplier.
- Supplier details (`supplier_details`, object): Additional structured supplier details. Use the documented fields.
- Bank info (`bank_info`, object): Additional structured bank info. Use the documented fields.

**Outputs**

- `data` (object): Data.
- `has_more` (true/false): Has more.
- `next_cursor` (text): Next cursor.

**Example output**

```json
{
  "data": {
    "item": {
      "companyId": "example",
      "id": "example",
      "name": "example",
      "primaryEmail": "example"
    }
  },
  "has_more": false,
  "next_cursor": null
}
```
