Trendsic Platform Service

<back to all web services

CommissionBatchRequest

Requires Authentication
Requires any of the roles:Agent, Administrator, Agent, Administrator
The following routes are available for this service:
GET,OPTIONS/v1/CommissionBatch/{CommissionBatchId}
GET,POST,OPTIONS/v1/CommissionBatch

export class Ledger
{
    public LedgerId: number;
    public AgentId: number;
    public CommissionBatchId: number;
    public Rank: string;
    public Commissions: number;
    public Clawbacks: number;
    public Adjustments: number;
    public PreviousBalance: number;
    public ASAPCharges: number;
    public Payout: number;
    public BalanceForward: number;

    public constructor(init?: Partial<Ledger>) { (Object as any).assign(this, init); }
}

export class LedgerExtended extends Ledger
{
    public AgentFirstName: string;
    public AgentLastName: string;
    public AgentName: string;
    public AgentLevel: number;
    public PayChexId: string;

    public constructor(init?: Partial<LedgerExtended>) { super(init); (Object as any).assign(this, init); }
}

export class CommissionBatchResponse
{
    public ResponseStatus: ResponseStatus;
    public ReportData: LedgerExtended[] = [];

    public constructor(init?: Partial<CommissionBatchResponse>) { (Object as any).assign(this, init); }
}

export class CommissionBatchRequest
{
    public CommissionBatchId: number;
    public Ledger: LedgerExtended[] = [];

    public constructor(init?: Partial<CommissionBatchRequest>) { (Object as any).assign(this, init); }
}

TypeScript CommissionBatchRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /v1/CommissionBatch HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	CommissionBatchId: 0,
	Ledger: 
	[
		{
			AgentFirstName: String,
			AgentLastName: String,
			AgentName: String,
			AgentLevel: 0,
			PayChexId: String,
			LedgerId: 0,
			AgentId: 0,
			CommissionBatchId: 0,
			Rank: String,
			Commissions: 0,
			Clawbacks: 0,
			Adjustments: 0,
			PreviousBalance: 0,
			ASAPCharges: 0,
			Payout: 0,
			BalanceForward: 0
		}
	]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	},
	ReportData: 
	[
		{
			AgentFirstName: String,
			AgentLastName: String,
			AgentName: String,
			AgentLevel: 0,
			PayChexId: String,
			LedgerId: 0,
			AgentId: 0,
			CommissionBatchId: 0,
			Rank: String,
			Commissions: 0,
			Clawbacks: 0,
			Adjustments: 0,
			PreviousBalance: 0,
			ASAPCharges: 0,
			Payout: 0,
			BalanceForward: 0
		}
	]
}