---
title: "Starts an export of all invoice items in the specified batch and returns the ExportID."
method: POST
path: "/Ams/{ClientID}/FinanceBatches"
tags: ["Ams"]
---

# Starts an export of all invoice items in the specified batch and returns the ExportID.

`POST /Ams/{ClientID}/FinanceBatches`

## Request

- Base URL: `https://ws.yourmembership.com`
- URL: `https://ws.yourmembership.com/Ams/{ClientID}/FinanceBatches`
- Auth: HTTP basic
- TypeScript: <https://skmtc.dev/yourmembership/apis/ym-rest-services/docs/Ams/:ClientID/FinanceBatches/post.ts> (a function with typed inputs; its response is checked against the schema)

To query the status of an export, call Sa.Export.Status until receiving either a COMPLETE or FAILURE status code. Upon receiving a COMPLETE status code, the download location of your export file will be returned by Sa.Export.Status as ExportURI.

## Path parameters

- `ClientID` integer, required

## Request body `application/x-www-form-urlencoded`

- object
  - `CommerceType` string
  - `ClosingDate` string, date-time
  - `ClosedOnly` boolean
  - `Timestamp` string, date-time
  - `StartBatchID` string
  - `PageSize` integer
  - `PageNumber` integer
  - `UsingRedis` boolean
  - `AppInitTime` string, date-time
  - `ServerID` string
  - `ResponseStatus` string
  - `BypassCache` boolean
  - `DateCached` string, date-time
  - `Device` string

## Response `200`

Success

- FinanceBatchesResponse: FinanceBatchesResponse
  - `BatchID` string
  - `ItemCount` integer
  - `FinanceBatchList` FinanceBatch[]
    - `BatchID` string
    - `CommerceType` string
    - `ItemCount` integer
    - `ClosedDate` string, date-time
    - `CreateDateTime` string, date-time
  - `CommerceType` string
  - `ClosingDate` string, date-time
  - `ClosedOnly` boolean
  - `Timestamp` string, date-time
  - `StartBatchID` string
  - `PageSize` integer
  - `PageNumber` integer
  - `UsingRedis` boolean
  - `AppInitTime` string, date-time
  - `ServerID` string
  - `ClientID` integer
  - `ResponseStatus` ResponseStatus: ResponseStatus
    - `ErrorCode` string
    - `Message` string
    - `StackTrace` string
    - `Errors` ResponseError[]
      - `ErrorCode` string
      - `FieldName` string
      - `Message` string
      - `Meta` DictionaryStringString: Dictionary<String,String>
    - `Meta` DictionaryStringString: Dictionary<String,String>
  - `BypassCache` boolean
  - `DateCached` string, date-time
  - `Device` string

---

[API](https://skmtc.dev/yourmembership/apis/ym-rest-services.md) - [All operations](https://skmtc.dev/yourmembership/apis/ym-rest-services/llms.txt) - [OpenAPI document](https://skmtc.dev/yourmembership/apis/ym-rest-services/revisions/8d8a2e7e7d56?raw)
