Field Squared API Services

<back to all web services

PricingList

Represents a DTO for a pricing list in a workspace. Calls without an ObjectId will retrieve an array of all active pricing list objects for the workspace.

The following routes are available for this service:
GET,POST,PUT,DELETE/{Workspace}/PricingList/{ObjectId}
GET/{Workspace}/PricingList
import java.math.*
import java.util.*
import net.servicestack.client.*


/**
* Represents a DTO for a pricing list in a workspace.  Calls without an ObjectId will retrieve an array of all active pricing list objects for the workspace.
*/
open class PricingList
{
    var Workspace:String? = null
    var ObjectId:String? = null
    var VersionId:String? = null
    var BasedOn:String? = null
    var Name:String? = null
    var Categories:ArrayList<PricingListCat> = ArrayList<PricingListCat>()
    var Items:ArrayList<PricingListItem> = ArrayList<PricingListItem>()
}

open class PricingListCat
{
    var ObjectId:String? = null
    var Name:String? = null
    var Categories:ArrayList<PricingListCat> = ArrayList<PricingListCat>()
    var Items:ArrayList<PricingListItem> = ArrayList<PricingListItem>()
}

open class PricingListItem
{
    var ObjectId:String? = null
    var Description:String? = null
    var Details:String? = null
    var Manufacturer:String? = null
    var Model:String? = null
    var Photo:String? = null
    var IsTaxable:Boolean? = null
    var Unit:String? = null
    var UnitPrice:Double? = null
    var Barcode:String? = null
}

Kotlin PricingList 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}/PricingList/{ObjectId} HTTP/1.1 
Host: dev.fieldsquared.com 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"Workspace":"String","ObjectId":"String","VersionId":"String","BasedOn":"String","Name":"String","Categories":[{"ObjectId":"String","Name":"String","Categories":[{"ObjectId":"String","Name":"String","Categories":[{"ObjectId":"String","Name":"String","Items":[{"ObjectId":"String","Description":"String","Details":"String","Manufacturer":"String","Model":"String","Photo":"String","IsTaxable":false,"Unit":"String","UnitPrice":0,"Barcode":"String"}]}],"Items":[{"ObjectId":"String","Description":"String","Details":"String","Manufacturer":"String","Model":"String","Photo":"String","IsTaxable":false,"Unit":"String","UnitPrice":0,"Barcode":"String"}]}],"Items":[{"ObjectId":"String","Description":"String","Details":"String","Manufacturer":"String","Model":"String","Photo":"String","IsTaxable":false,"Unit":"String","UnitPrice":0,"Barcode":"String"}]}],"Items":[{"ObjectId":"String","Description":"String","Details":"String","Manufacturer":"String","Model":"String","Photo":"String","IsTaxable":false,"Unit":"String","UnitPrice":0,"Barcode":"String"}]}