1. EventCredits
Tahdah API
  • Introduction
  • Webhooks
  • Unresolved schema mappings
  • TrustGroups
    • About Trust Groups
    • Endpoints
      • List Trust Groups
      • Create a Trust Group
      • Update Trust Group
      • List Trust Group Legal Entity Members
      • List Trust Group Candidate Members
      • Add Trust Group Member
      • Remove Trust Group Member
    • Member Updated
  • EventCredits
    • Add Credits to Legal Entity
      PUT
    • Event Credits Updated
  • Tracker
    • About Tracker
    • Get Candidate Targets
    • Get Legal Entity Targets
  • Pathways
    • About Pathways
    • Registrations
      • About Registrations
      • Get Registrations
      • Create Registations
      • Registration Created
    • Get Legal Entity Pathways
    • Get Pathway
  • DigitalBadges
    • Issue Digital Badge
    • Get Badge Templates
  • LegalEntities
    • People/Staff
      • Legal Entity People List
      • Connect a Person to a Legal Entity
      • Person Added
      • Roles Updated
    • Legal Entity Details
    • Create Legal Entity
    • Legal Entity Created
  • Candidates
    • EndPoints
      • Create Candidate
      • Update a Candidate
      • Delete Candidate
      • Add/Remove tags to a candidate
    • Webhooks
  • Catalogues
    • Catalogue Entry Published
  • Finance
    • Ledger Entry Created
  • Schemas
    • Inbound
    • Events
      • EventTemplateCreditRequest
      • EventTemplateCredit
    • Catalogue
      • CatalogueEntry
    • Finance
      • Currency
      • InvoiceItem
      • PaymentItem
      • LedgerEntry
      • InvoiceAddress
      • Entity
    • LearningExperiences
      • LearningExperienceRef
      • PathwayTypeRef
    • Candidate
      • CandidateRef
    • LegalEntities
      • RoleRef
      • LegalEntity
      • legalEntityIdentifier
    • TrustGroupMember
    • TrustGroup
    • temp
    • Candidate
    • HATEOAS Link
  1. EventCredits

Add Credits to Legal Entity

Testing
New Genergy Live
https://api.tahdah.me
New Genergy Live
https://api.tahdah.me
PUT
/api/eventcredits/legalentities/{legalEntityId}

Add or Remove Event Credits#

This endpoint adjusts the event-credit balance for a given legal entity.
You can add credits, or remove credits (e.g., refunds, corrections), depending on the values you provide.

Idempotency Key#

You must supply a unique idempotencyKey for each request.
If the same key is reused, the API returns an error.
This prevents the same request from being processed more than once.

Order Information#

You must supply an orderNumber, which identifies the source of the credits.
You may also provide the purchaser name for reference and audit purposes.

Credits Requested#

Provide a list of credit operations, each containing:
eventTemplateId — the event template the credits apply to
numberOfCredits — the quantity to add (positive) or remove (negative)

Removing Credits (Negative Values)#

If numberOfCredits is negative:
The system will first attempt to reduce credits originating from the specified orderNumber.
If that order does not have enough remaining credits, the system will reduce credits from other orders, starting with the oldest.
The total credit balance for a given eventTemplateId will never be reduced below zero.
A legal entity cannot end up with a negative credit balance.

Empty Credit List Behaviour#

If the request is valid but creditsRequested is empty, the API will still return the current credit balance for the legal entity.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Path Params

Body Params application/json

Example
{
    "idempotencyKey": "I_4255",
    "orderNumber": "4255",
    "purchaser": "John Doe",
    "creditsRequested": [
        {
            "eventTemplateId": 4123,
            "numberOfCredits": 10
        },
        {
            "eventTemplateId": 4123,
            "numberOfCredits": 10
        },
        {
            "eventTemplateId": 4123,
            "numberOfCredits": -5
        }
    ]
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PUT 'https://api.tahdah.me/api/eventcredits/legalentities/' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "idempotencyKey": "I_4255",
    "orderNumber": "4255",
    "purchaser": "John Doe",
    "creditsRequested": [
        {
            "eventTemplateId": 4123,
            "numberOfCredits": 10
        },
        {
            "eventTemplateId": 4123,
            "numberOfCredits": 10
        },
        {
            "eventTemplateId": 4123,
            "numberOfCredits": -5
        }
    ]
}'

Responses

🟢200Success
application/json
Body

Example
[
    {
        "id": 123,
        "legalEntityId": 1,
        "eventTemplateId": 7462,
        "quantityPurchased": 10,
        "quantityRemaining": 10,
        "datePurchased": "2024-01-01T18:59:59",
        "remoteOrderNumber": "ABC123",
        "purchaserName": "John Doe"
    },
    {
        "id": 123,
        "legalEntityId": 1,
        "eventTemplateId": 7463,
        "quantityPurchased": 10,
        "quantityRemaining": 10,
        "datePurchased": "2024-01-01T18:59:59",
        "remoteOrderNumber": "ABC123",
        "purchaserName": "John Doe"
    }
]
🟠403Forbidden
🟠400Bad Request
Modified at 2026-03-11 14:45:42
Previous
Member Updated
Next
Event Credits Updated
Built with