Get deleted items stats

Get a list of products, orders, customers and coupons that have been deleted from a store

There are 4 endpoints: deleted products, orders, customers, coupons.

  • GET https://app.ecwid.com/api/v3/{storeId}/products/deleted?from_date={from_date}&to_date={to_date}&offset={offset}&limit={limit}
  • GET https://app.ecwid.com/api/v3/{storeId}/orders/deleted?from_date={from_date}&to_date={to_date}&offset={offset}&limit={limit}
  • GET https://app.ecwid.com/api/v3/{storeId}/customers/deleted?from_date={from_date}&to_date={to_date}&offset={offset}&limit={limit}
  • GET https://app.ecwid.com/api/v3/{storeId}/discount_coupons/deleted?from_date={from_date}&to_date={to_date}&offset={offset}&limit={limit}

📘

Please, note that we keep the data about deleted products, orders and etc. for 6 months only.

Headers

NameTypeDescription
AuthorizationstringoAuth token with mandatory Bearer before it. Example: Bearer e***s0, where e***s0 should be replaced with your oAuth token.

Path parameters

FieldTypeDescription
entitystringOne of: orders, products, coupons, customers

Query parameters

FieldTypeDescription
from_datestringItem deletion date lower bound. Supported formats:
  • UNIX timestamp
  • yyyy-MM-dd HH:mm:ss Z
  • yyyy-MM-dd HH:mm:ss
  • yyyy-MM-dd
Examples:
  • 1447804800
  • 2015-04-22 18:48:38 -0500
  • 2015-04-22 (this is 2015-04-22 00:00:00 UTC)
to_datestringItem deletion date upper bound. Supported formats:
  • UNIX timestamp
  • yyyy-MM-dd HH:mm:ss Z
  • yyyy-MM-dd HH:mm:ss
  • yyyy-MM-dd
offsetnumberOffset from the beginning of the returned items list (for paging)
limitnumberMaximum number of returned items. Default value: 100

Response

Each endpoint returns the information about the batch, the removed items IDs and the deletion dates in JSON object of type DeletedItemsStats

DeletedItemsStats

FieldTypeDescription
totalnumberThe total number of found items (might be more than the number of returned items)
countnumberThe total number of the items returned in this batch
offsetnumberOffset from the beginning of the returned items list (for paging)
limitnumberMaximum number of returned items. Maximum allowed value: 100. Default value: 10
itemsArray<RemovedItem>The removed items list with IDs and dates

Removed item

FieldTypeDescription
idnumberItem ID. Depending on the request, that is products ID, customer ID, order number or coupon ID.
datestringItem deletion date

Errors

In case of error, Ecwid responds with an error HTTP status code and, optionally, JSON-formatted body containing error description

HTTP codes

HTTP StatusDescription
400Request parameters are malformed
415Unsupported content-type: expected application/json or text/json
500There was an internal server error while processing the request

Error response body (optional)

FieldTypeDescription
errorMessagestringError message
Language
Authorization
Query