Trendsic Platform Service

<back to all web services

GetInvoicesByProjectRequest

Requires Authentication
Requires any of the roles:Worker, Agent, Administrator
The following routes are available for this service:
GET,OPTIONS/v1/invoice/project/{ProjectUID}
"use strict";
export class GetInvoicesByProjectRequest {
    /** @param {{ProjectUID?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    ProjectUID;
}
export class Invoice {
    /** @param {{InvoiceID?:number,InvoiceUID?:string,ProjectUID?:string,InvoiceNumber?:string,InvoiceDate?:string,DueDate?:string,FromName?:string,FromPhone?:string,FromEmail?:string,FromAddress?:string,FromDesc?:string,ToName?:string,ToPhone?:string,ToEmail?:string,ToAddress?:string,ToDesc?:string,Notes?:string,Currency?:string,Status?:number,Total?:number,IsPaid?:boolean,PaidDate?:string,IsDeleted?:boolean,IsLocked?:boolean,CreatedDate?:string,ModifiedDate?:string,CreatedByUID?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    InvoiceID;
    /** @type {?string} */
    InvoiceUID;
    /** @type {?string} */
    ProjectUID;
    /** @type {string} */
    InvoiceNumber;
    /** @type {?string} */
    InvoiceDate;
    /** @type {?string} */
    DueDate;
    /** @type {string} */
    FromName;
    /** @type {string} */
    FromPhone;
    /** @type {string} */
    FromEmail;
    /** @type {string} */
    FromAddress;
    /** @type {string} */
    FromDesc;
    /** @type {string} */
    ToName;
    /** @type {string} */
    ToPhone;
    /** @type {string} */
    ToEmail;
    /** @type {string} */
    ToAddress;
    /** @type {string} */
    ToDesc;
    /** @type {string} */
    Notes;
    /** @type {string} */
    Currency;
    /** @type {number} */
    Status;
    /** @type {?number} */
    Total;
    /** @type {?boolean} */
    IsPaid;
    /** @type {?string} */
    PaidDate;
    /** @type {?boolean} */
    IsDeleted;
    /** @type {?boolean} */
    IsLocked;
    /** @type {?string} */
    CreatedDate;
    /** @type {?string} */
    ModifiedDate;
    /** @type {?string} */
    CreatedByUID;
}
export class ProjectInvoiceData {
    /** @param {{InvoicedAmount?:number,PaidAmount?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {?number} */
    InvoicedAmount;
    /** @type {?number} */
    PaidAmount;
}
export class GetInvoicesByProjectResponse {
    /** @param {{ResponseStatus?:ResponseStatus,Invoices?:Invoice[],ProjectInvoiceData?:ProjectInvoiceData}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {ResponseStatus} */
    ResponseStatus;
    /** @type {Invoice[]} */
    Invoices = [];
    /** @type {ProjectInvoiceData} */
    ProjectInvoiceData;
}

JavaScript GetInvoicesByProjectRequest 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.

GET /v1/invoice/project/{ProjectUID} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
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
		}
	},
	Invoices: 
	[
		{
			InvoiceID: 0,
			InvoiceUID: 00000000000000000000000000000000,
			ProjectUID: 00000000000000000000000000000000,
			InvoiceNumber: String,
			InvoiceDate: 0001-01-01,
			DueDate: 0001-01-01,
			FromName: String,
			FromPhone: String,
			FromEmail: String,
			FromAddress: String,
			FromDesc: String,
			ToName: String,
			ToPhone: String,
			ToEmail: String,
			ToAddress: String,
			ToDesc: String,
			Notes: String,
			Currency: String,
			Status: 0,
			Total: 0,
			IsPaid: False,
			PaidDate: 0001-01-01,
			IsDeleted: False,
			IsLocked: False,
			CreatedDate: 0001-01-01,
			ModifiedDate: 0001-01-01,
			CreatedByUID: 00000000000000000000000000000000
		}
	],
	ProjectInvoiceData: 
	{
		InvoicedAmount: 0,
		PaidAmount: 0
	}
}