Trendsic Platform Service

<back to all web services

ChangeOrderListRequest

Requires Authentication
The following routes are available for this service:
GET,OPTIONS/v1/projects/{ProjectID}/change-orders
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ChangeOrderLine:
    change_order_line_i_d: int = 0
    change_order_i_d: int = 0
    category: Optional[str] = None
    description: Optional[str] = None
    cost_u_s_d: Decimal = decimal.Decimal(0)
    markup_pct: Decimal = decimal.Decimal(0)
    cost_code: Optional[str] = None
    sort_order: int = 0


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ChangeOrder:
    change_order_i_d: int = 0
    change_order_u_i_d: Optional[str] = None
    project_i_d: int = 0
    co_number: Optional[str] = None
    title: Optional[str] = None
    scope: Optional[str] = None
    status: Optional[str] = None
    cost_u_s_d: Decimal = decimal.Decimal(0)
    price_u_s_d: Decimal = decimal.Decimal(0)
    schedule_days: int = 0
    overhead_profit_pct: Decimal = decimal.Decimal(0)
    pricing_method: Optional[str] = None
    origin_type: Optional[str] = None
    origin_ref: Optional[str] = None
    cost_code: Optional[str] = None
    opened_at: Optional[datetime.datetime] = None
    submitted_at: Optional[datetime.datetime] = None
    decided_at: Optional[datetime.datetime] = None
    created_by: Optional[str] = None
    created_at: Optional[datetime.datetime] = None
    updated_at: Optional[datetime.datetime] = None
    days_open: int = 0
    lines: List[ChangeOrderLine] = field(default_factory=list)


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ChangeOrderContractSummary:
    project_i_d: int = 0
    original_contract: Decimal = decimal.Decimal(0)
    approved_c_o_value: Decimal = decimal.Decimal(0)
    approved_c_o_count: int = 0
    pending_c_o_value: Decimal = decimal.Decimal(0)
    pending_c_o_count: int = 0
    revised_contract: Decimal = decimal.Decimal(0)
    potential_contract: Decimal = decimal.Decimal(0)
    approved_schedule_days: int = 0


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ChangeOrderListResponse:
    response_status: Optional[ResponseStatus] = None
    project_i_d: int = 0
    orders: List[ChangeOrder] = field(default_factory=list)
    summary: Optional[ChangeOrderContractSummary] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ChangeOrderListRequest:
    project_i_d: int = 0

Python ChangeOrderListRequest 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/projects/{ProjectID}/change-orders HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<ChangeOrderListResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <Orders>
    <ChangeOrder>
      <CONumber>String</CONumber>
      <ChangeOrderID>0</ChangeOrderID>
      <ChangeOrderUID>00000000-0000-0000-0000-000000000000</ChangeOrderUID>
      <CostCode>String</CostCode>
      <CostUSD>0</CostUSD>
      <CreatedAt>0001-01-01T00:00:00</CreatedAt>
      <CreatedBy>String</CreatedBy>
      <DaysOpen>0</DaysOpen>
      <DecidedAt>0001-01-01T00:00:00</DecidedAt>
      <Lines>
        <ChangeOrderLine>
          <Category>String</Category>
          <ChangeOrderID>0</ChangeOrderID>
          <ChangeOrderLineID>0</ChangeOrderLineID>
          <CostCode>String</CostCode>
          <CostUSD>0</CostUSD>
          <Description>String</Description>
          <MarkupPct>0</MarkupPct>
          <SortOrder>0</SortOrder>
        </ChangeOrderLine>
      </Lines>
      <OpenedAt>0001-01-01T00:00:00</OpenedAt>
      <OriginRef>String</OriginRef>
      <OriginType>String</OriginType>
      <OverheadProfitPct>0</OverheadProfitPct>
      <PriceUSD>0</PriceUSD>
      <PricingMethod>String</PricingMethod>
      <ProjectID>0</ProjectID>
      <ScheduleDays>0</ScheduleDays>
      <Scope>String</Scope>
      <Status>String</Status>
      <SubmittedAt>0001-01-01T00:00:00</SubmittedAt>
      <Title>String</Title>
      <UpdatedAt>0001-01-01T00:00:00</UpdatedAt>
    </ChangeOrder>
  </Orders>
  <ProjectID>0</ProjectID>
  <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>
  <Summary>
    <ApprovedCOCount>0</ApprovedCOCount>
    <ApprovedCOValue>0</ApprovedCOValue>
    <ApprovedScheduleDays>0</ApprovedScheduleDays>
    <OriginalContract>0</OriginalContract>
    <PendingCOCount>0</PendingCOCount>
    <PendingCOValue>0</PendingCOValue>
    <PotentialContract>0</PotentialContract>
    <ProjectID>0</ProjectID>
    <RevisedContract>0</RevisedContract>
  </Summary>
</ChangeOrderListResponse>