Field Squared API Services

<back to all web services

LaborItem

The following routes are available for this service:
GET,PUT,POST,DELETE/{Workspace}/LaborItem
GET,PUT,POST,DELETE/{Workspace}/LaborItem/{ObjectId}
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 LaborItem:
    object_id: Optional[str] = None
    workspace: Optional[str] = None
    item_type_id: Optional[str] = None
    price: Optional[float] = None
    item_type_name: Optional[str] = None
    time_worked: Optional[float] = None
    time_charged: Optional[float] = None
    start_time: Optional[str] = None
    end_time: Optional[str] = None
    user_id: Optional[str] = None
    rate: Optional[float] = None
    owning_task_id: Optional[str] = None
    start_status: Optional[str] = None
    end_status: Optional[str] = None
    start_event_id: Optional[str] = None
    end_event_id: Optional[str] = None
    qty: Optional[float] = None

Python LaborItem DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

POST /{Workspace}/LaborItem HTTP/1.1 
Host: dev.fieldsquared.com 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"ObjectId":"String","Workspace":"String","ItemTypeId":"String","Price":0,"ItemTypeName":"String","TimeWorked":0,"TimeCharged":0,"StartTime":"String","EndTime":"String","UserId":"String","Rate":0,"OwningTaskId":"String","StartStatus":"String","EndStatus":"String","StartEventId":"String","EndEventId":"String","Qty":0}