Trendsic Platform Service

<back to all web services

InvoiceWorkChangesRequest

Requires Authentication
Requires any of the roles:Agent, Administrator
The following routes are available for this service:
GET,OPTIONS/v1/invoice/workchanges/{ProjectUID}
import Foundation
import ServiceStack

public class InvoiceWorkChangesRequest : Codable
{
    public var projectUID:String
    public var invoiceID:Int?

    required public init(){}
}

public class InvoiceWorkChangesResponse : Codable
{
    public var responseStatus:ResponseStatus
    public var success:Bool
    public var changes:[InvoiceWorkChange] = []

    required public init(){}
}

public class InvoiceWorkChange : Codable
{
    public var sourceType:String
    public var sourceID:Int
    public var jobID:Int?
    public var workDate:Date?
    public var workDay:String
    public var displayDay:String
    public var label:String
    public var jobName:String
    public var displayDate:Date?
    public var unit:String
    public var billed:Double
    public var nowQuantity:Double
    public var overBilled:Double
    public var unitFactor:Double
    public var price:Double
    public var amount:Double
    public var lineType:String
    public var isTaxable:Bool
    public var invoiceID:Int
    public var invoiceUID:String
    public var invoiceNumber:String
    public var invoiceTotal:Double
    public var invoiceIsLocked:Bool
    public var invoiceIsPaid:Bool
    public var state:String
    public var remembered:String
    public var decidedByName:String
    public var decidedAt:Date?

    required public init(){}
}


Swift InvoiceWorkChangesRequest DTOs

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

HTTP + XML

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

GET /v1/invoice/workchanges/{ProjectUID} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<InvoiceWorkChangesResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <Changes>
    <InvoiceWorkChange>
      <Amount>0</Amount>
      <Billed>0</Billed>
      <DecidedAt>0001-01-01T00:00:00</DecidedAt>
      <DecidedByName>String</DecidedByName>
      <DisplayDate>0001-01-01T00:00:00</DisplayDate>
      <DisplayDay>String</DisplayDay>
      <InvoiceID>0</InvoiceID>
      <InvoiceIsLocked>false</InvoiceIsLocked>
      <InvoiceIsPaid>false</InvoiceIsPaid>
      <InvoiceNumber>String</InvoiceNumber>
      <InvoiceTotal>0</InvoiceTotal>
      <InvoiceUID>00000000-0000-0000-0000-000000000000</InvoiceUID>
      <IsTaxable>false</IsTaxable>
      <JobID>0</JobID>
      <JobName>String</JobName>
      <Label>String</Label>
      <LineType>String</LineType>
      <NowQuantity>0</NowQuantity>
      <OverBilled>0</OverBilled>
      <Price>0</Price>
      <Remembered>String</Remembered>
      <SourceID>0</SourceID>
      <SourceType>String</SourceType>
      <State>String</State>
      <Unit>String</Unit>
      <UnitFactor>0</UnitFactor>
      <WorkDate>0001-01-01T00:00:00</WorkDate>
      <WorkDay>String</WorkDay>
    </InvoiceWorkChange>
  </Changes>
  <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
    <d2p1:ErrorCode>String</d2p1:ErrorCode>
    <d2p1:Message>String</d2p1:Message>
    <d2p1:StackTrace>String</d2p1:StackTrace>
    <d2p1:Errors>
      <d2p1:ResponseError>
        <d2p1:ErrorCode>String</d2p1:ErrorCode>
        <d2p1:FieldName>String</d2p1:FieldName>
        <d2p1:Message>String</d2p1:Message>
        <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </d2p1:Meta>
      </d2p1:ResponseError>
    </d2p1:Errors>
    <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </d2p1:Meta>
  </ResponseStatus>
  <Success>false</Success>
</InvoiceWorkChangesResponse>