Skip to content

Unpin a report

DELETE
/stores/{storeRef}/reports/pins
curl --request DELETE \
--url https://apibase.ecomweb.app/api/v1/stores/example/reports/pins \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '{ "saved_report_id": "example", "preset_key": "example" }'

Removes the pin of a preset or saved report for the user the API key acts as. Send exactly one of saved_report_id or preset_key in the request body.

Required scopes: read:analytics

storeRef
required
string

The store’s ref, as returned by GET /stores.

Media typeapplication/json
object
saved_report_id

A saved report’s id

string
preset_key

A built-in preset’s key

string
<= 100 characters

Example generated

{
"saved_report_id": "example",
"preset_key": "example"
}

The report was unpinned.

The request is malformed or failed validation.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}

The key is missing, invalid, revoked or expired.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}

The key may not do this: a missing scope, a readonly key, a publishable key on a Store API route, or a disallowed origin.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}