Retrieve invoicing data for companies
GET {{baseUrl}}/v1/invoices/:invoice_period?page=<number>&per=<number>&company_uuids=<string>
Retrieve data for active companies used to calculate invoices for Gusto Embedded Payroll. A company is considered active for an invoice period if they are an active partner managed company, have run payroll or created contractor payments since becoming a partner managed company, and are not suspended at any point during the invoice period. This endpoint forces pagination, with 100 results returned at a time. You can learn more about our pagination here: pagination guide
📘 Token Authentication
This endpoint uses the organization level api token and the Token scheme with HTTP Authorization header
scope: invoices:read
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
page | string | The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. | |
per | string | Number of objects per page. For majority of endpoints will default to 25 | |
company_uuids | string | Filter companies returned in the active_companies response, will return an error if company not active during provided invoice period. i.e. ?company_uuids=781922d8-e780-4b6b-bf74-ee303166d022,bbbca930-7322-491c-ba7f-98707a52a9c5 |
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
X-Gusto-API-Version | string | Determines the date-based API version associated with your API call. If none is provided, your application's minimum API version is used. | |
Accept | string |
RESPONSES
status: OK
{"active_companies":[{"company_uuid":"05ed3150-591e-4f8b-bfd5-55d478edd2d8","active_employees":5,"active_contractors":3,"initial_invoice_period":"2022-01"},{"company_uuid":"9b37429c-e540-40fb-86b3-738ca9af65c7","active_employees":0,"active_contractors":1,"initial_invoice_period":"2023-05"}]}