POST /v2/invoices/search
Searches for invoices from a location specified in the filter. You can optionally specify customers in the filter for whom to retrieve invoices. In the current implementation, you can only specify one location and optionally one customer.
The response is paginated. If truncated, the response includes a cursor
that you use in a subsequent request to retrieve the next set of invoices.
Servers
- https://connect.squareup.com
Request headers
Name | Type | Required | Description |
---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Request body fields
Name | Type | Required | Description |
---|---|---|---|
query |
Object | Yes |
Describes query criteria for searching invoices. |
query.filter |
Object | Yes |
Describes query filters to apply. |
query.filter.customer_ids[] |
Array | No |
Limits the search to the specified customers, within the specified locations. Specifying a customer is optional. In the current implementation, a maximum of one customer can be specified. |
query.filter.location_ids[] |
Array | Yes |
Limits the search to the specified locations. A location is required. In the current implementation, only one location can be specified. |
query.sort |
Object | No |
Identifies the sort field and sort order. |
query.sort.field |
String | Yes |
The field to use for sorting. |
query.sort.order |
String | No |
The order to use for sorting the results. |
limit |
Integer | No |
The maximum number of invoices to return (200 is the maximum |
cursor |
String | No |
A pagination cursor returned by a previous call to this endpoint. Provide this cursor to retrieve the next set of results for your original query. For more information, see Pagination. |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.