Skip to content

Get customer subscriptions

GET
/merchants/{merchantCode}/customers/{customerId}/subscriptions
curl --request GET \
--url 'https://customer.shopgate.io/v1/merchants/example/customers/example/subscriptions?sort=null&limit=100&offset=0'

Get customer subscriptions

merchantCode
required
string
customerId
required
string
filters
string

Filter for

  • status
  • subscriptionType

sort
string

Comma-separated list of fields to sort by and sort directions, separated by a colon each (e.g. field1:asc,field2:desc).

limit
integer
default: 100 <= 1000

The limit of entries of one page

offset
integer
0

The offset where to start the page

Media typeapplication/json
object
subscriptions
Array<object>
object
code

Subscription code. This needs to be unique within every user

string
subscriptionType

Type of subscription

string
Allowed values: productInventoryRestocked
entityType

The entity for which the subscription should be created

string
Allowed values: product
entityId

Id of the referenced entity, depending on entity type

string
status
string
Allowed values: active inactive triggered
params

Additional subscription properties

object
key
additional properties
any
createDate
string format: date-time
meta
object
limit
number
offset
number
totalItemCount
number
Example
{
"meta": {
"limit": 100,
"offset": 0,
"totalItemCount": 1
},
"subscriptions": [
{
"code": "default",
"subscriptionType": "productInventoryRestocked",
"entityType": "product",
"entityId": "p1",
"status": "active",
"params": {
"productName": "Example product",
"imageUrl": "https://www.shopgate.com/hs-fs/hubfs/Schloss_IIII.jpeg?width=1200&height=900&name=Schloss_IIII.jpeg"
},
"createDate": "2019-10-03T16:01:13.582Z"
}
]
}

Access denied

Media typeapplication/json
object
code

Machine readable error code

string
message
required

Human readable error code

string
Examplegenerated
{
"code": "example",
"message": "example"
}

Merchant or Customer not found

Media typeapplication/json

Unexpected error

Media typeapplication/json
object
code

Machine readable error code

string
message
required

Human readable error code

string
Examplegenerated
{
"code": "example",
"message": "example"
}