API open badge Help

Credits transactions

Each organization has a Wallet with the number of credits that can be used to issue a badge.

Retrieve a Credit Transaction details

Retrieve details of a specific credit transaction by its ID.

GET

/api/v1/issuers/organization/credit_transactions/{transaction_id}

Pass the id

{ "data": { "id": "80c5fb78-f2ba-4ecf-9d97-56adba3a4f89", "organization_id": "e5737c21-0645-4616-9b25-c010685c5b30", "user_id": 11, "description": "Test transaction", "credits": 50, "currency": "EUR", "amount": "100.00", "status": "accepted", "created_at": "2024-06-24T07:04:04.000000Z", "updated_at": "2024-06-24T09:29:16.000000Z" } }

Credit Transactions listing

This endpoint lists all credit transactions for the organization, including credit purchases and consumption. It helps track how credits have been used over time.

GET

/api/v1/issuers/organization/credit_transactions

Query Parameters

  • created_at_after: Filter transactions starting from this date (optional).

  • created_at_before: Filter transactions up to this date (optional).

  • status: Filter transactions by its status, acceptable values accepted, request, declined (optional).

  • credit: Filter transaction by the specific number of credits.

  • amount: Filter transactions by the specific amount.

  • user_id: Filter by the user requested/user credits.

{ "data": [], "links": { "first": "https:\/\/openbadges.open-badge.eu\/api\/v1\/issuers\/organization\/credit_transactions?page=1", "last": "https:\/\/openbadges.open-badge.eu\/api\/v1\/issuers\/organization\/credit_transactions?page=1", "prev": null, "next": null }, "meta": { "current_page": 1, "from": null, "last_page": 1, "links": [ { "url": null, "label": "« Previous", "active": false }, { "url": "https:\/\/openbadges.open-badge.eu\/api\/v1\/issuers\/organization\/credit_transactions?page=1", "label": "1", "active": true }, { "url": null, "label": "Next »", "active": false } ], "path": "https:\/\/openbadges.open-badge.eu\/api\/v1\/issuers\/organization\/credit_transactions", "per_page": 25, "to": null, "total": 0 } }
Last modified: 12 November 2024