---
title: "Starts shipment report generation"
method: POST
path: "/shipment-reports/v4"
tags: ["Shipment Reports"]
---

# Starts shipment report generation

`POST /shipment-reports/v4`

This endpoint starts the shipment report generation. One can specify which shipments to include
in the shipments report by using the filters in the request body. The response contains the generated
shipment report ID `shipmentReportId`.

After the shipment report generation has been requested, the status of the shipment report generation
can be checked by using the `/shipment-reports/v4/{shipmentReportId}/status` endpoint.

## Request body

- object
  - `endedAfter` string, date-time — Include successfully completed shipments of each shipment plan into the shipment report generation which ended after the provided date.
  - `endedBefore` string, date-time — Include successfully completed shipments of each shipment plan into the shipment report generation which ended before the provided date.
  - `shipmentPlanIds` string[] — Provide array of shipment plan ids to include into the shipment report. If just a single shipment plan id is given, then the shipment report will include only metrics and shipments for the given shipment plan. If none is given, then the shipment report will include all shipment plans.
  - `startedAfter` string, date-time — Include successfully completed shipments of each shipment plan into the shipment report generation which started after the provided date.
  - `startedBefore` string, date-time — Include successfully completed shipments of each shipment plan into the shipment report generation which started before the provided date.

## Response `202`

Accepted

The shipment reports generation started successfully. Use the `shipmentReportId` for checking
the status of the generation, and once it's generated, it can be used for fetching the metrics.

- object
  - `shipmentReportId` string, required — Shipment report ID

## Other responses

- `400` — Bad request The request object is in an incorrect format or has values that are invalid or out of range. If available, further error details are provided in the response body.
- `401` — Unauthorized The request did not provide correct authentication details
- `403` — Forbidden The account does not have the correct privileges
- `404` — Not Found The specified resource was not found
- `429` — Too Many Requests User has sent too many requests in a given amount of time.

---

[API](https://skmtc.net/here/apis/tracking.md) · [All operations](https://skmtc.net/here/apis/tracking/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/here/tracking/revisions/efa162f7023c/schema)
