CopyHero

Get Refunds

GET
/api/v1/analytics/refunds

Refund operations of the organization's stores in a period, one row per refund, newest first.

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Query Parameters

date_from*Date From

First shop calendar day of the period (inclusive). Refunds are filtered by the shop-local day of the refund.

Formatdate
date_to*Date To

Last shop calendar day of the period (inclusive); at most tomorrow (UTC); the period is at most 366 days inclusive.

Formatdate
store_ids?array<integer>|

Only these organization stores; an unknown, foreign or deleted id answers 404. Repeated values: ?store_ids=12&store_ids=17

include?array<>

Components counted in net_shop besides products. Repeated values: ?include=shipping&include=tip.

Default[]
skip?Skip
Range0 <= value
Default0
limit?Limit
Range1 <= value <= 250
Default50

Response Body

Successful Response

application/json
  1. response
count*Count
data*array<>
Example Request
curl -X GET 'https://app.copyhero.app/api/v1/analytics/refunds?date_from=2019-08-24&date_to=2019-08-24'
Example Response
{  "count": 0,  "data": [    {      "store_id": 0,      "order_gid": "string",      "agreement_gid": "string",      "happened_at": "2019-08-24T14:15:22Z",      "net_shop": "string",      "components": {        "property1": "string",        "property2": "string"      },      "currency": "AED",      "products": [        {          "internal_product_id": "17d65d0a-2bba-46da-af25-e6db2fc23598",          "title": "string",          "quantity": 0,          "amount_shop": "string"        }      ]    }  ]}