Saltar para o conteúdo

List cycles on a subscription

Pedido

Returns the cycles attached to a subscription, ordered from newest to oldest. Use status[] to narrow the result set — values are case-insensitive. Pagination is cursor-based: pass the previous response's metadata.next_cursor back as cursor. An empty next_cursor means there are no further pages.

Required scope: subscription:read

Segurança
accountId and apiKey
Caminho
idstring, (uuid)obrigatório

UUID of the subscription whose cycles you want to list.

Consulta
limitinteger, [ 1 .. 100 ]

Maximum number of cycles to return. Defaults to 50, capped at 100.

Padrão:50
Exemplo:limit=10
cursorstring

Opaque cursor from the previous response's metadata.next_cursor. Omit on the first call.

Exemplo:cursor=lL_j7ilk7rc
statusArray of strings

Filter by one or more statuses. Repeat the parameter for multiple values (e.g. status[]=pending&status[]=failed). Case-insensitive.

Items Enum:"PENDING""PROCESSING""WAITING""SUCCESS""FAILED""RETRY""FAILOVER""DELETED"
Exemplo:status=PENDING&status=FAILED
curl -i -X GET \
  'https://api.test.easypay.pt/2.0/subscription/{id}/cycle?limit=10&cursor=lL_j7ilk7rc&status=PENDING%2CFAILED' \
  -H 'AccountId: 2b0f63e2-9fb5-4e52-aca0-b4bf0339bbe6' \
  -H 'ApiKey: eae4aa59-8e5b-4ec2-887d-b02768481a92'

Respostas

OK

Corpoapplication/json
dataArray of objects(Cycle)obrigatório
metadataobject(Metadata)obrigatório

An object containing additional information about the response. It includes details that help manage and navigate the retrieved data.

Response
{ "data": [ {}, {} ], "metadata": { "next_cursor": "lL_j7ilk7rc", "count": 2 } }