# Wallet Metrics

## Fetch account usage information

> Fetch accounting usage per wallet-id

```json
{"openapi":"3.0.3","info":{"title":"Reporting","version":"v1"},"tags":[{"name":"metrics","description":"Provide metrics to the customers"}],"security":[{"user":[]},{"accessKey":[]}],"components":{"securitySchemes":{"user":{"description":"Provide the token that is returned upon login","scheme":"bearer","type":"http","bearerFormat":"jwt"},"accessKey":{"description":"Uses the Authorization header: 'AccessKey ' followed by your access key token (e.g., 'Authorization: AccessKey AbCdEfGhIjKlMnOpQrStUvWxYzAbCdEfGhIj')","scheme":"AccessKey","type":"http"}},"schemas":{"AccountingUsageCreate":{"type":"object","title":"CreateAccountingUsageMetrics","additionalProperties":false,"required":["periodStart","periodEnd","periodGroup"],"properties":{"periodStart":{"$ref":"#/components/schemas/PeriodDate"},"periodEnd":{"$ref":"#/components/schemas/PeriodDate"},"periodGroup":{"type":"string","enum":["day","month"]},"groupBy":{"type":"array","items":{"type":"string","enum":["product","productFamily"]}}}},"PeriodDate":{"type":"string","format":"date"},"AccountingUsageResult":{"type":"object","title":"Accounting usage list","description":"A list of accounting usage","required":["dataColumns"],"properties":{"periodGroup":{"type":"string","enum":["day","month"]},"dataColumns":{"type":"array","items":{"type":"string","enum":["walletId","currency","productId","productName","productFamilyId","productFamilyName"]}},"results":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["periodDate"],"properties":{"periodDate":{"type":"string","format":"date"},"totalCharged":{"type":"number","format":"float"},"totalCount":{"type":"integer"},"data":{"type":"array","items":{"type":"string"}}}}}}},"ValidationError":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}}},"required":["code","message"]}},"responses":{"validationError":{"description":"The request did not pass validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}}}},"paths":{"/organizations/{organizationId}/reporting/accounting/wallets/{walletId}/usage":{"post":{"summary":"Fetch account usage information","operationId":"getAccountingUsageByFilter","description":"Fetch accounting usage per wallet-id","tags":["metrics"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingUsageCreate"}}}},"responses":{"200":{"description":"List of results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingUsageResult"}}}},"422":{"$ref":"#/components/responses/validationError"}}}}}}
```

## Fetch account product usage information details

> Fetch accounting usage details per wallet-id

```json
{"openapi":"3.0.3","info":{"title":"Reporting","version":"v1"},"tags":[{"name":"metrics","description":"Provide metrics to the customers"}],"security":[{"user":[]},{"accessKey":[]}],"components":{"securitySchemes":{"user":{"description":"Provide the token that is returned upon login","scheme":"bearer","type":"http","bearerFormat":"jwt"},"accessKey":{"description":"Uses the Authorization header: 'AccessKey ' followed by your access key token (e.g., 'Authorization: AccessKey AbCdEfGhIjKlMnOpQrStUvWxYzAbCdEfGhIj')","scheme":"AccessKey","type":"http"}},"schemas":{"AccountingProductUsageDetailsCreate":{"type":"object","title":"CreateAccountingProductUsageDetailsMetrics","additionalProperties":false,"required":["periodStart","periodGroup"],"properties":{"periodStart":{"$ref":"#/components/schemas/PeriodDate"},"periodGroup":{"type":"string","enum":["day","month"]}}},"PeriodDate":{"type":"string","format":"date"},"AccountingProductUsageDetailsResult":{"type":"object","title":"Accounting product usage details list","description":"A list of accounting usage for a product","required":["dataColumns"],"properties":{"periodStart":{"$ref":"#/components/schemas/PeriodDate"},"periodGroup":{"type":"string","enum":["day","month"]},"dataColumns":{"type":"array","items":{"type":"string"}},"results":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["periodDate"],"properties":{"periodDate":{"type":"string","format":"date"},"priceEach":{"type":"number","format":"float"},"totalCharged":{"type":"number","format":"float"},"totalCount":{"type":"integer"},"data":{"type":"array","items":{"type":"string"}}}}}}},"ValidationError":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}}},"required":["code","message"]}},"responses":{"validationError":{"description":"The request did not pass validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}}}},"paths":{"/organizations/{organizationId}/reporting/accounting/wallets/{walletId}/usage/product/{productId}/details":{"post":{"summary":"Fetch account product usage information details","operationId":"getAccountingProductUsageDetailsByFilter","description":"Fetch accounting usage details per wallet-id","tags":["metrics"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingProductUsageDetailsCreate"}}}},"responses":{"200":{"description":"List of results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingProductUsageDetailsResult"}}}},"422":{"$ref":"#/components/responses/validationError"}}}}}}
```
