Pay
A pay object includes pay rates, fees, bonuses, penalties, expenses, and other payment related information. The table below describes each parameter and how it maps to the Field Nation Platform.
Pay Object
Parameter | Type | Example | Mapping/Notes |
---|---|---|---|
work_order_id | integer | “work_order_id”: 1731 | Work Order ID. |
type | string | "type": "fixed" | Payment > How will this work be paid? Refer to Pay Rates for more information. |
base | object | “base”: {} | Depends on pay type. Refer to Pay Rates for more information. |
additional | object | “additional”: {} | Depends on pay type. Refer to Pay Rates for more information. |
expenses | object | “expenses”: {} | Pay > Expenses. Refer to Expenses for parameter details and examples. |
bonuses | object | “bonuses”: {} | Pay > Bonuses. Refer to Bonuses for parameter details and examples. |
penalties | object | “penalties”: {} | Pay > Penalties. Refer to Penalties for parameter details and examples. |
Examples
Refer to Pay Rates for pay types and examples.
Work Order Pay Response
You can locate pay information in the work order > pay object.
"pay": { }
Work Order Pay Response, Fixed Pay
"pay": {
"work_order_id": 1731,
"type": "fixed",
"base": {
"units": 1,
"amount": 400
},
"additional": {
"units": 0,
"amount": 0
},
"hold": {
"id": 0,
"amount": 0,
"charged": false
},
"fees": [
{
"name": "cancellation",
"id": 0,
"amount": 0,
"queued": false,
"charged": false,
"hours24_applicable": false,
"calculation": "fixed",
"at_risk": false
},
{
"name": "flat",
"amount": 0,
"charged": false
},
{
"name": "buyer",
"amount": 0,
"calculation": "percent",
"modifier": 0,
"charged": false,
"undetermined_service_fee": false,
"min_amount": 0,
"max_amount": 0
}
],
"payment": {
"id": 0,
"amount": 0,
"charged": false,
"date": {
"utc": "",
"local": {
"date": "",
"time": ""
}
}
},
"finance": {
"id": 0,
"terms": "",
"description": "Default",
"limit": 0
},
"can_view": true,
"reported_hours": 0,
"number_of_devices": 0,
"minimum_payment": 20,
"range": {
"min": 400,
"max": 400
},
"actions": [
"edit"
],
"labor_sum": 400,
"fees_cancellation_pending": false,
"passive_cancellation_amount": 30,
"fee_cancellation_queued": "0",
"fee_cancellation_charged": "0",
"status_id": "1",
"funding": [
{
"id": 0,
"name": "Pre-fund",
"amount": 10000,
"custom_name": "Pre-fund | Available: $10,000.00"
}
],
"correlation_id": "d203afcc27fcc3a6d95a3b2fdd6f4a7c40c2b2ce",
"bonuses": {
"metadata": {
"total": 0,
"per_page": 0,
"page": 1,
"pages": 1
},
"sum": {
"all": 0,
"charged": 0,
"uncharged": 0
},
"results": [],
"actions": [
"add"
]
},
"penalties": {
"metadata": {
"total": 0,
"per_page": 0,
"page": 1,
"pages": 1
},
"sum": {
"all": 0,
"charged": 0,
"uncharged": 0
},
"results": [],
"actions": [
"add"
]
},
"discounts": {
"metadata": {
"total": 0,
"per_page": 0,
"page": 1,
"pages": 1
},
"sum": {
"all": 0
},
"results": [],
"actions": []
},
"expenses": {
"metadata": {
"total": 0,
"per_page": 0,
"page": 1,
"pages": 1
},
"sum": {
"all": 0,
"charged": 0,
"uncharged": 0
},
"results": [],
"actions": [
"add"
]
},
"increases": {
"metadata": {
"total": 0,
"per_page": 0,
"page": 1,
"pages": 1
},
"minimum": 20,
"sum": {
"all": 0
},
"results": [],
"actions": []
},
"pricing_insights": {
"region": {
"name": "Phoenix, AZ",
"id": 1380,
"distance": 0.003657439608062145
},
"providers": {
"marketplace": 27
},
"average_rate": {
"first_quartile": 0,
"median": 0,
"third_quartile": 0
},
"average_fixed_rate": {
"first_quartile": 0,
"median": 0,
"third_quartile": 0
},
"comparison": ""
},
"max_pay": 400,
"total": 400,
"calculated_total": {
"total": {
"min": 400,
"max": 400
}
},
"fn_process_payment": "1"
}
Work Order Pay Response, Dollar Bonus
"pay":{
"work_order_id":3039,
"type":"fixed",
"base":{
"units":1,
"amount":400
},
"additional":{
"units":0,
"amount":0
},
"hold":{
"id":0,
"amount":0,
"charged":false
},
"fees":[
{
"name":"cancellation",
"id":0,
"amount":0,
"queued":false,
"charged":false,
"hours24_applicable":false,
"calculation":"fixed",
"at_risk":false
},
{
"name":"flat",
"amount":0,
"charged":false
},
{
"name":"buyer",
"amount":0,
"calculation":"percent",
"modifier":0,
"charged":false,
"undetermined_service_fee":false,
"min_amount":0,
"max_amount":0
}
],
"payment":{
"id":0,
"amount":0,
"charged":false,
"date":{
"utc":"",
"local":{
"date":"",
"time":""
}
}
},
"finance":{
"id":0,
"terms":"",
"description":"Default",
"limit":0
},
"can_view":true,
"reported_hours":0,
"number_of_devices":0,
"minimum_payment":20,
"range":{
"min":400,
"max":400
},
"actions":[
"edit"
],
"labor_sum":400,
"fees_cancellation_pending":false,
"passive_cancellation_amount":30,
"fee_cancellation_queued":"0",
"fee_cancellation_charged":"0",
"status_id":"1",
"funding":[
{
"id":0,
"name":"Pre-fund",
"amount":8660,
"custom_name":"Pre-fund | Available: $8,660.00"
}
],
"correlation_id":"0cfee9aae6214a0b440f5f3f6b224ea03a91db83",
"bonuses":{
"metadata":{
"total":1,
"per_page":1,
"page":1,
"pages":1
},
"sum":{
"all":35,
"charged":0,
"uncharged":35
},
"results":[
{
"id":3,
"charged":false,
"calculation":"fixed",
"modifier":35,
"name":"Dollar Amount Bonus",
"description":"Example rule explanation.",
"amount":35,
"actions":[
]
}
],
"actions":[
"add"
]
},
"penalties":{
"metadata":{
"total":1,
"per_page":1,
"page":1,
"pages":1
},
"sum":{
"all":10,
"charged":0,
"uncharged":10
},
"results":[
{
"id":6,
"charged":false,
"calculation":"fixed",
"modifier":10,
"name":"Dollar Amount Penalty",
"description":"Example rule explanation.",
"amount":10,
"actions":[
]
}
],
"actions":[
"add"
]
},
"discounts":{
"metadata":{
"total":0,
"per_page":0,
"page":1,
"pages":1
},
"sum":{
"all":0
},
"results":[
],
"actions":[
]
},
"expenses":{
"metadata":{
"total":3,
"per_page":3,
"page":1,
"pages":1
},
"sum":{
"all":150,
"charged":150,
"uncharged":0
},
"results":[
{
"id":102,
"status":"approved",
"description":"Toll Fee",
"status_description":"new",
"amount":25,
"quantity":1,
"author":{
"id":756,
"first_name":"API",
"last_name":"User"
},
"category":{
"id":0,
"label":"Uncategorized",
"type":"system",
"uid":0,
"company_expense_id":0,
"amount":0
},
"added":{
"utc":"2018-12-20 21:06:39",
"local":{
"date":"2018-12-20",
"time":"14:06:39"
}
},
"actions":[
"deny"
]
},
{
"id":101,
"status":"approved",
"description":"Toll Fee",
"status_description":"new",
"amount":25,
"quantity":1,
"author":{
"id":756,
"first_name":"API",
"last_name":"User"
},
"company_expense":{
"id":2,
"description":"Custom Expense",
"api_code":"custExpense",
"hidden_tags":"",
"expense_amount":40
},
"category":{
"id":0,
"label":"Custom Expense -$40.00",
"type":"custom",
"uid":-2,
"amount":40,
"company_expense_id":2
},
"added":{
"utc":"2018-12-20 21:05:22",
"local":{
"date":"2018-12-20",
"time":"14:05:22"
}
},
"actions":[
"deny"
]
},
{
"id":100,
"status":"approved",
"description":"Parts",
"status_description":"",
"amount":100,
"quantity":1,
"author":{
"id":756,
"first_name":"API",
"last_name":"User"
},
"category":{
"id":1,
"label":"Personal Material Costs (Other Materials)",
"type":"system",
"uid":1,
"company_expense_id":0,
"amount":0
},
"added":{
"utc":"2018-12-20 21:03:08",
"local":{
"date":"2018-12-20",
"time":"14:03:08"
}
},
"actions":[
"deny"
]
}
],
"actions":[
"add"
]
},
"increases":{
"metadata":{
"total":0,
"per_page":0,
"page":1,
"pages":1
},
"minimum":20,
"sum":{
"all":0
},
"results":[
],
"actions":[
]
},
"pricing_insights":{
"region":{
"name":"Phoenix, AZ",
"id":1380,
"distance":0.00006787103196070074
},
"providers":{
"marketplace":27
},
"average_rate":{
"first_quartile":0,
"median":0,
"third_quartile":0
},
"average_fixed_rate":{
"first_quartile":0,
"median":0,
"third_quartile":0
},
"comparison":""
},
"max_pay":585,
"total":550,
"calculated_total":{
"total":{
"min":550,
"max":550
}
},
"fn_process_payment":"1"
}
Pay Response by Work Order
{
"work_order_id": 3039,
"type": "fixed",
"base": {
"units": 1,
"amount": 400
},
"additional": {
"units": 0,
"amount": 0
},
"hold": {
"id": 0,
"amount": 0,
"charged": false
},
"fees": [
{
"name": "cancellation",
"id": 0,
"amount": 0,
"queued": false,
"charged": false,
"hours24_applicable": false,
"calculation": "fixed",
"at_risk": false
},
{
"name": "flat",
"amount": 0,
"charged": false
},
{
"name": "buyer",
"amount": 0,
"calculation": "percent",
"modifier": 0,
"charged": false,
"undetermined_service_fee": false,
"min_amount": 0,
"max_amount": 0
}
],
"payment": {
"id": 0,
"amount": 0,
"charged": false,
"date": {
"utc": "",
"local": {
"date": "",
"time": ""
}
}
},
"finance": {
"id": 0,
"terms": "",
"description": "Default",
"limit": 0
},
"can_view": true,
"reported_hours": 0,
"number_of_devices": 0,
"minimum_payment": 20,
"range": {
"min": 400,
"max": 400
},
"actions": [
"edit"
],
"labor_sum": 400,
"fees_cancellation_pending": false,
"passive_cancellation_amount": 30,
"fee_cancellation_queued": "0",
"fee_cancellation_charged": "0",
"funding": [
{
"id": 0,
"name": "Pre-fund",
"amount": 2960,
"custom_name": "Pre-fund | Available: $2,960.00"
}
],
"correlation_id": "0cfee9aae6214a0b440f5f3f6b224ea03a91db83",
"bonuses": {
"metadata": {
"total": 2,
"per_page": 2,
"page": 1,
"pages": 1
},
"sum": {
"all": 43,
"charged": 0,
"uncharged": 43
},
"results": [
{
"id": 3,
"charged": false,
"calculation": "fixed",
"modifier": 35,
"name": "Dollar Amount Bonus",
"description": "Example rule explanation.",
"amount": 35,
"actions": []
},
{
"id": 4,
"charged": false,
"calculation": "percent",
"modifier": 2,
"name": "Percentage Bonus",
"description": "Example rule explanation.",
"amount": 8,
"actions": []
}
],
"actions": [
"add"
]
},
"penalties": {
"metadata": {
"total": 1,
"per_page": 1,
"page": 1,
"pages": 1
},
"sum": {
"all": 10,
"charged": 0,
"uncharged": 10
},
"results": [
{
"id": 6,
"charged": false,
"calculation": "fixed",
"modifier": 10,
"name": "Dollar Amount Penalty",
"description": "Example rule explanation.",
"amount": 10,
"actions": []
}
],
"actions": [
"add"
]
},
"discounts": {
"metadata": {
"total": 0,
"per_page": 0,
"page": 1,
"pages": 1
},
"sum": {
"all": 0
},
"results": [],
"actions": []
},
"expenses": {
"metadata": {
"total": 3,
"per_page": 3,
"page": 1,
"pages": 1
},
"sum": {
"all": 150,
"charged": 150,
"uncharged": 0
},
"results": [
{
"id": 102,
"status": "approved",
"description": "Toll Fee",
"status_description": "new",
"amount": 25,
"quantity": 1,
"author": {
"id": 756,
"first_name": "API",
"last_name": "User"
},
"category": {
"id": 0,
"label": "Uncategorized",
"type": "system",
"uid": 0,
"company_expense_id": 0,
"amount": 0
},
"added": {
"utc": "2018-12-20 21:06:39",
"local": {
"date": "2018-12-20",
"time": "14:06:39"
}
},
"actions": [
"deny"
]
},
{
"id": 101,
"status": "approved",
"description": "Toll Fee",
"status_description": "new",
"amount": 25,
"quantity": 1,
"author": {
"id": 756,
"first_name": "API",
"last_name": "User"
},
"company_expense": {
"id": 2,
"description": "Custom Expense",
"api_code": "custExpense",
"hidden_tags": "",
"expense_amount": 40
},
"category": {
"id": 0,
"label": "Custom Expense -$40.00",
"type": "custom",
"uid": -2,
"amount": 40,
"company_expense_id": 2
},
"added": {
"utc": "2018-12-20 21:05:22",
"local": {
"date": "2018-12-20",
"time": "14:05:22"
}
},
"actions": [
"deny"
]
},
{
"id": 100,
"status": "approved",
"description": "Parts",
"status_description": "",
"amount": 100,
"quantity": 1,
"author": {
"id": 756,
"first_name": "API",
"last_name": "User"
},
"category": {
"id": 1,
"label": "Personal Material Costs (Other Materials)",
"type": "system",
"uid": 1,
"company_expense_id": 0,
"amount": 0
},
"added": {
"utc": "2018-12-20 21:03:08",
"local": {
"date": "2018-12-20",
"time": "14:03:08"
}
},
"actions": [
"deny"
]
}
],
"actions": [
"add"
]
},
"increases": {
"metadata": {
"total": 0,
"per_page": 0,
"page": 1,
"pages": 1
},
"minimum": 20,
"sum": {
"all": 0
},
"results": [],
"actions": []
},
"pricing_insights": {
"region": {
"name": "Phoenix, AZ",
"id": 1380,
"distance": 0.00006787103196070074
},
"providers": {
"marketplace": 27
},
"average_rate": {
"first_quartile": 0,
"median": 0,
"third_quartile": 0
},
"average_fixed_rate": {
"first_quartile": 0,
"median": 0,
"third_quartile": 0
},
"comparison": ""
},
"max_pay": 593,
"total": 550,
"calculated_total": {
"total": {
"min": 550,
"max": 550
}
},
"fn_process_payment": "1"
}