Admin

Create a Credit

Post a credit grant or debit to the team ledger.

post/admin/credits

Request

  • Base URL: https://api.presscart.com (the document declares no server; this is the origin it was published from)
  • URL: https://api.presscart.com/admin/credits
  • Auth: HTTP bearer

Request body

amountnumber required
type'DEBIT' | 'CREDIT' required
team_idstring uuid nullable required
notesstring nullable required
reasonstring nullable required
order_idstring uuid
credit_type'FUNDED' | 'PROMOTIONAL' | 'REFERRAL' | 'REFUND' | 'MANUAL'
expires_atstring date-time nullable
idempotency_keystring

Example request

{
  "amount": 280,
  "type": "CREDIT",
  "notes": "Commission for article #123",
  "reason": "referral_commission"
}

Response

Credit created successfully

idstring uuid required
amountnumber required
type'DEBIT' | 'CREDIT' required
reasonstring nullable required
notesstring nullable required
entitystring nullable required
entity_idstring nullable required
user_idstring uuid required
team_idstring uuid nullable required
created_bystring uuid nullable required
credit_type'FUNDED' | 'PROMOTIONAL' | 'REFERRAL' | 'REFUND' | 'MANUAL' | 'BONUS' nullable required
transaction_idstring uuid required
status'PENDING' | 'POSTED' | 'ARCHIVED' required
external_sourcestring nullable required
order_idstring uuid nullable required

Example response

{
  "amount": 280,
  "type": "CREDIT",
  "reason": "referral_commission",
  "notes": "Commission for article #123",
  "entity": "order_items",
  "entity_id": "123e4567-e89b-12d3-a456-426614174000"
}

Changes

No recorded changes to this operation across all 2 revisions of this API.