Skip to main content
POST
/
reporting
/
parcels
Create a parcels report
curl --request POST \
  --url https://panel.sendcloud.sc/api/v2/reporting/parcels \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "fields": [
    "parcel_id"
  ],
  "filters": {
    "direction": "outgoing",
    "integration_id": 2,
    "updated_after": "2023-11-07T05:31:56Z",
    "updated_before": "2023-11-07T05:31:56Z",
    "announced_after": "2023-11-07T05:31:56Z",
    "announced_before": "2023-11-07T05:31:56Z"
  }
}
'
{
  "filters": {
    "direction": "outgoing",
    "integration_id": 2,
    "updated_after": "2023-11-07T05:31:56Z",
    "updated_before": "2023-11-07T05:31:56Z",
    "announced_after": "2023-11-07T05:31:56Z",
    "announced_before": "2023-11-07T05:31:56Z"
  },
  "fields": [
    "parcel_id"
  ],
  "id": "419f3be0-2f49-434b-bee4-d8cff9cf7d01",
  "user_id": 1,
  "status": "ready",
  "status_message": "The report is ready",
  "url": "https://reporting-service.s3.eu-central-1.amazonaws.com/reports/report-type/2021-08-09/afc46bb9-95d3-4880-80f7-660da3e68b5c.csv",
  "expires_at": "2022-07-14T08:38:10.226217",
  "updated_at": "2022-07-14T08:23:10.226265",
  "created_at": "2022-07-14T08:23:10.226265"
}
The parcels included in the report will depend on the filters provided, and the columns will be determined by the fields parameter. Use this endpoint to create the report and obtain the report id, which you will use to obtain the actual CSV download via the Retrieve a parcels report endpoint.

Authorizations

Authorization
string
header
required

Basic Authentication using API key and secrets is currently the main authentication mechanism.

Body

application/json

A parcel report request

fields
enum<string>[]
required

The parcel fields to include for the report

Available options:
parcel_id,
direction,
carrier_code,
carrier_name,
from_company_name,
contract_id,
contract_type,
origin_city,
origin_postal_code,
origin_country_code,
origin_country_name,
destination_city,
destination_postal_code,
destination_country_code,
destination_country_name,
order_number,
tracking_number,
created_at,
updated_at,
announced_at,
shipped_at,
first_delivery_at,
arrived_at,
shipping_method,
shipping_method_name,
price,
global_status_slug,
carrier_status,
integration_id,
integration_type,
weight
filters
Parcels Report Filters Object · object
required

A parcels report filter

Response

Successful Response

Report information

This model contains information about the creation of a report and the status of processing such report.

filters
Parcels Report Filters Object · object
required

A parcels report filter

fields
enum<string>[]
required

The parcel fields to include for the report

Available options:
parcel_id,
direction,
carrier_code,
carrier_name,
from_company_name,
contract_id,
contract_type,
origin_city,
origin_postal_code,
origin_country_code,
origin_country_name,
destination_city,
destination_postal_code,
destination_country_code,
destination_country_name,
order_number,
tracking_number,
created_at,
updated_at,
announced_at,
shipped_at,
first_delivery_at,
arrived_at,
shipping_method,
shipping_method_name,
price,
global_status_slug,
carrier_status,
integration_id,
integration_type,
weight
id
string<uuid>

The unique identifier for the report.

Example:

"419f3be0-2f49-434b-bee4-d8cff9cf7d01"

user_id
integer

Id of the user that created the report.

Required range: x >= 1
Example:

1

status
enum<string>

Current status of the report.

Available options:
queued,
generating,
ready,
failed,
expired
Example:

"ready"

status_message
string

Description of the status of the report.

Example:

"The report is ready"

url
string<uri>

URL to download the report.

Required string length: 1 - 65536
Example:

"https://reporting-service.s3.eu-central-1.amazonaws.com/reports/report-type/2021-08-09/afc46bb9-95d3-4880-80f7-660da3e68b5c.csv"

expires_at
string<date-time>

When the report will expire.

Example:

"2022-07-14T08:38:10.226217"

updated_at
string<date-time>

When was the report last updated.

Example:

"2022-07-14T08:23:10.226265"

created_at
string<date-time>

When was the report created.

Example:

"2022-07-14T08:23:10.226265"