curl --location --request POST 'https://api.malga.io/v1/graphql' \
--header 'X-Client-Id: YOUR_CLIENT_ID' \
--header 'X-Api-Key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"query allCharges {\n charges {\n allCharges(\n first: 1\n startDate: \"2023-09-01 00:00:00\"\n endDate: \"2023-10-01 00:00:00\"\n ) {\n edges {\n cursor\n node {\n clientId\n id\n createdAt\n description\n orderId\n originalAmount\n paymentMethod {\n installments\n paymentType\n }\n status\n transactionRequests {\n id\n amount\n createdAt\n transactionId\n idempotencyKey\n requestStatus\n requestType\n }\n }\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n }\n totalCount\n }\n }\n}","variables":{}}'
{
"data": {
"charges": {
"allCharges": {
"edges": [
{
"cursor": "eyJpZCI6IDE2OTM2OTMxMzU4NjN9",
"node": {
"clientId": "1b2c2ef7-03cd-4012-9d1c-aff50551fae3",
"id": "96c3e228-149c-4217-9a46-a411d66d3432",
"createdAt": "2023-09-02T22:18:55.863042",
"description": "Loja 1",
"orderId": null,
"originalAmount": 100,
"paymentMethod": {
"installments": 1,
"paymentType": "credit"
},
"status": "failed",
"transactionRequests": [
{
"id": "a1b9a02a-2e5a-477d-bd81-37f8d96a3799",
"amount": "100",
"createdAt": "2023-09-02T22:18:56.007904",
"transactionId": "cb044961-731e-4abe-aaf5-0e3f7f259021",
"idempotencyKey": "9c37cf52-d83d-4420-b4a6-95f37c10b807",
"requestStatus": "failed",
"requestType": "pre_authorization"
}
]
}
}
],
"pageInfo": {
"endCursor": "eyJpZCI6IDE2OTM2OTMxMzU4NjN9",
"hasNextPage": true,
"hasPreviousPage": false
},
"totalCount": 418417
}
}
}
}