[
{
"id": 0,
"customer_id": 0,
"is_draft": true,
"is_editing": true,
"is_to_sequence_lines": true,
"override_on_hold": true,
"recalculate_prices": true,
"apply_available_document_discount_percent": true,
"lock_id": 0,
"customer_delivery_address_id": 0,
"suppress_warnings": true,
"document_no": "string",
"customer_type": "string",
"document_date": "string",
"document_status": "string",
"despatch_receipt_status": "string",
"invoice_credit_status": "string",
"cancelled_status": "string",
"currency_id": 0,
"exchange_rate": 0.0,
"subtotal_goods_value": 0.0,
"subtotal_charge_net_value": 0.0,
"subtotal_charge_tax_value": 0.0,
"subtotal_discount_value": 0.0,
"total_net_value": 0.0,
"total_tax_value": 0.0,
"total_gross_value": 0.0,
"customer_document_no": "string",
"is_credit_limit_exceeded": true,
"use_invoice_address": true,
"is_triangulated": true,
"settlement_discount_days": 0,
"settlement_discount_percent": 0.0,
"document_discount_percent": 0.0,
"available_document_discount_percent": 0.0,
"document_created_by": "string",
"requested_delivery_date": "string",
"promised_delivery_date": "string",
"quotation_expiry_date": "string",
"order_priority": "string",
"external_reference": "string",
"payment_with_order": true,
"payment_type": "string",
"invoice_payment_with_order_immediately": true,
"payment_value": 0.0,
"payment_reference": "string",
"payment_method_id": 0,
"payment_declared": 0.0,
"payment_undeclared": 0.0,
"declared_payment_remaining": 0.0,
"analysis_code_1": "string",
"analysis_code_2": "string",
"analysis_code_3": "string",
"analysis_code_4": "string",
"analysis_code_5": "string",
"analysis_code_6": "string",
"analysis_code_7": "string",
"analysis_code_8": "string",
"analysis_code_9": "string",
"analysis_code_10": "string",
"analysis_code_11": "string",
"analysis_code_12": "string",
"analysis_code_13": "string",
"analysis_code_14": "string",
"analysis_code_15": "string",
"analysis_code_16": "string",
"analysis_code_17": "string",
"analysis_code_18": "string",
"analysis_code_19": "string",
"analysis_code_20": "string",
"spare_text_1": "string",
"spare_text_2": "string",
"spare_text_3": "string",
"spare_text_4": "string",
"spare_text_5": "string",
"spare_text_6": "string",
"spare_text_7": "string",
"spare_text_8": "string",
"spare_text_9": "string",
"spare_text_10": "string",
"spare_number_1": 0.0,
"spare_number_2": 0.0,
"spare_number_3": 0.0,
"spare_number_4": 0.0,
"spare_number_5": 0.0,
"spare_number_6": 0.0,
"spare_number_7": 0.0,
"spare_number_8": 0.0,
"spare_number_9": 0.0,
"spare_number_10": 0.0,
"spare_date_1": "string",
"spare_date_2": "string",
"spare_date_3": "string",
"spare_date_4": "string",
"spare_date_5": "string",
"spare_bool_1": true,
"spare_bool_2": true,
"spare_bool_3": true,
"spare_bool_4": true,
"spare_bool_5": true,
"cash_account_invoice_address": {
"id": 0,
"postal_name": "string",
"address_1": "string",
"address_2": "string",
"address_3": "string",
"address_4": "string",
"city": "string",
"county": "string",
"country": "string",
"postcode": "string",
"date_time_created": "string",
"date_time_updated": "string"
},
"currency": {},
"customer": {},
"delivery_address": {
"id": 0,
"postal_name": "string",
"address_1": "string",
"address_2": "string",
"address_3": "string",
"address_4": "string",
"city": "string",
"county": "string",
"country": "string",
"postcode": "string",
"contact": "string",
"telephone_number": "string",
"fax_number": "string",
"email_address": "string",
"tax_number": "string",
"tax_code_id": 0,
"country_code_id": 0,
"tax_code": {},
"country_code": {},
"date_time_created": "string",
"date_time_updated": "string"
},
"payment_method": {},
"payment_status": {
"is_partially_invoiced": true,
"is_amendable": true,
"is_reference_amendable": true,
"is_payment_method_amendable": true
},
"profitability": {
"id": 0,
"sop_order_return_id": 0,
"estimated_cost_value": 0.0,
"estimated_profit_percent_on_revenue": 0.0,
"estimated_profit_percent_on_cost": 0.0,
"estimated_profit_value": 0.0,
"issue_value": 0.0,
"realised_cost_value": 0.0,
"realised_issue_value": 0.0,
"realised_profit_percent_on_revenue": 0.0,
"realised_profit_percent_on_cost": 0.0,
"realised_profit_value": 0.0,
"simple_profit_calculation_only": true,
"stock_item_order_lines": [
{
"id": 0,
"sop_order_profit_analysis_id": 0,
"sop_order_return_line_id": 0,
"item_code": "string",
"item_description": "string",
"traceable_type": "string",
"line_type": "string",
"estimated_cost_rate": 0.0,
"estimated_profit_percent_on_revenue": 0.0,
"estimated_profit_percent_on_cost": 0.0,
"estimated_profit_value": 0.0,
"issue_rate": 0.0,
"line_quantity": 0.0,
"realised_cost_rate": 0.0,
"realised_cost_value": 0.0,
"realised_profit_percent_on_revenue": 0.0,
"realised_profit_percent_on_cost": 0.0,
"realised_profit_value": 0.0,
"realised_quantity": 0.0,
"date_time_created": "string",
"date_time_updated": "string"
}
],
"other_order_lines": [
{
"id": 0,
"sop_order_profit_analysis_id": 0,
"sop_order_return_line_id": 0,
"item_code": "string",
"item_description": "string",
"traceable_type": "string",
"line_type": "string",
"estimated_cost_rate": 0.0,
"estimated_profit_percent_on_revenue": 0.0,
"estimated_profit_percent_on_cost": 0.0,
"estimated_profit_value": 0.0,
"issue_rate": 0.0,
"line_quantity": 0.0,
"realised_cost_rate": 0.0,
"realised_cost_value": 0.0,
"realised_profit_percent_on_revenue": 0.0,
"realised_profit_percent_on_cost": 0.0,
"realised_profit_value": 0.0,
"realised_quantity": 0.0,
"date_time_created": "string",
"date_time_updated": "string"
}
],
"date_time_created": "string",
"date_time_updated": "string"
},
"lines": [
{
"id": 0,
"sop_order_id": 0,
"line_type": "string",
"product_id": 0,
"warehouse_id": 0,
"create_cancelled_line": true,
"is_to_split_line": true,
"code": "string",
"use_description": true,
"line_quantity": 0.0,
"to_allocate_quantity": 0.0,
"line_number": 0,
"tax_code_id": 0,
"nominal_reference": "string",
"nominal_cost_centre": "string",
"nominal_department": "string",
"allocated_quantity": 0.0,
"available_for_despatch": 0.0,
"despatch_receipt_quantity": 0.0,
"invoice_credit_quantity": 0.0,
"posted_invoice_credit_quantity": 0.0,
"stock_unit_line_quantity": 0.0,
"stock_unit_to_allocate_quantity": 0.0,
"stock_unit_allocated_quantity": 0.0,
"stock_unit_available_quantity": 0.0,
"stock_unit_available_for_despatch": 0.0,
"stock_unit_despatch_receipt_quantity": 0.0,
"stock_unit_invoice_credit_quantity": 0.0,
"stock_unit_posted_invoice_credit_quantity": 0.0,
"allocation_status": "string",
"despatch_receipt_status": "string",
"invoice_credit_status": "string",
"selling_unit_id": 0,
"selling_unit_description": "string",
"selling_unit_price": 0.0,
"selling_unit_price_overridden": true,
"pricing_unit_id": 0,
"pricing_unit_description": "string",
"line_unit_precision": 0.0,
"stock_unit_precision": 0.0,
"selling_unit_multiple": 0.0,
"stock_unit_multiple": 0.0,
"unit_discount_percent": 0.0,
"discount_percent_specified": true,
"unit_discount_value": 0.0,
"unit_discount_overridden": true,
"discounted_unit_price": 0.0,
"cost_price": 0.0,
"retain_manual_prices": true,
"fulfilment_method": "string",
"confirmation_intent_type": "string",
"mark_as_preferred": true,
"line_tax_value": 0.0,
"line_total_value": 0.0,
"requested_delivery_date": "string",
"promised_delivery_date": "string",
"picking_list_comment": "string",
"despatch_note_comment": "string",
"show_on_customer_docs": true,
"show_on_picking_list_type": "string",
"has_pop_order": true,
"back_to_back_status": "string",
"is_complete": true,
"is_line_deletable": true,
"analysis_code_1": "string",
"analysis_code_2": "string",
"analysis_code_3": "string",
"analysis_code_4": "string",
"analysis_code_5": "string",
"analysis_code_6": "string",
"analysis_code_7": "string",
"analysis_code_8": "string",
"analysis_code_9": "string",
"analysis_code_10": "string",
"analysis_code_11": "string",
"analysis_code_12": "string",
"analysis_code_13": "string",
"analysis_code_14": "string",
"analysis_code_15": "string",
"analysis_code_16": "string",
"analysis_code_17": "string",
"analysis_code_18": "string",
"analysis_code_19": "string",
"analysis_code_20": "string",
"spare_text_1": "string",
"spare_text_2": "string",
"spare_text_3": "string",
"spare_text_4": "string",
"spare_text_5": "string",
"spare_text_6": "string",
"spare_text_7": "string",
"spare_text_8": "string",
"spare_text_9": "string",
"spare_text_10": "string",
"spare_number_1": 0.0,
"spare_number_2": 0.0,
"spare_number_3": 0.0,
"spare_number_4": 0.0,
"spare_number_5": 0.0,
"spare_number_6": 0.0,
"spare_number_7": 0.0,
"spare_number_8": 0.0,
"spare_number_9": 0.0,
"spare_number_10": 0.0,
"spare_date_1": "string",
"spare_date_2": "string",
"spare_date_3": "string",
"spare_date_4": "string",
"spare_date_5": "string",
"spare_bool_1": true,
"spare_bool_2": true,
"spare_bool_3": true,
"spare_bool_4": true,
"spare_bool_5": true,
"additional_charge": {},
"discount": {
"id": 0,
"sop_order_return_line_id": 0,
"source_of_price_type": "string",
"discount_name": "string",
"currency_name": "string",
"pricing_type": "string",
"flat_rate_or_quantity_break_type": "string",
"quantity_break_quantity": 0.0,
"quantity_break_amount": 0.0,
"discount_or_surcharge_type": "string",
"value": 0.0,
"date_time_created": "string",
"date_time_updated": "string"
},
"nominal_code": {},
"pricing_unit": {},
"product": {},
"profitability": {
"id": 0,
"sop_order_profit_analysis_id": 0,
"sop_order_return_line_id": 0,
"item_code": "string",
"item_description": "string",
"traceable_type": "string",
"line_type": "string",
"estimated_cost_rate": 0.0,
"estimated_profit_percent_on_revenue": 0.0,
"estimated_profit_percent_on_cost": 0.0,
"estimated_profit_value": 0.0,
"issue_rate": 0.0,
"line_quantity": 0.0,
"realised_cost_rate": 0.0,
"realised_cost_value": 0.0,
"realised_profit_percent_on_revenue": 0.0,
"realised_profit_percent_on_cost": 0.0,
"realised_profit_value": 0.0,
"realised_quantity": 0.0,
"date_time_created": "string",
"date_time_updated": "string"
},
"selling_unit": {},
"sop_order": {},
"tax_code": {},
"warehouse": {},
"traceable_adjustment_items": [
{
"traceable_item_id": 0,
"identification_no": "string",
"quantity": 0.0,
"is_selected": true,
"original_quantity": 0.0,
"available_quantity": 0.0,
"allocation_quantity": 0.0,
"despatched_quantity": 0.0,
"supplier_reference": "string",
"receipt_date": "string",
"allocated_to_who_type": "string",
"additional_reference": "string",
"sell_by_date": "string",
"use_by_date": "string",
"traceable_bin_item_id": 0,
"bin_item_id": 0,
"bin_name": "string",
"sop_allocation_line_id": 0,
"sop_allocation_line_quantity": 0.0,
"traceable_allocation_balance_id": 0,
"is_allocated": true,
"is_selectable": true
}
],
"is_to_delete": true,
"date_time_created": "string",
"date_time_updated": "string"
}
],
"memos": [
{
"id": 0,
"sop_order_return_id": 0,
"is_active": true,
"note": "string",
"is_to_delete": true,
"created_by": "string",
"date_time_created": "string",
"date_time_updated": "string"
}
],
"date_time_created": "string",
"date_time_updated": "string"
}
]
{
"type": "array",
"items": {
"type": "object",
"required": [
"customer_id",
"document_no"
],
"properties": {
"id": {
"type": "integer",
"format": "int64",
"readOnly": true
},
"customer_id": {
"type": "integer",
"format": "int64"
},
"is_draft": {
"type": "boolean",
"readOnly": true
},
"is_editing": {
"type": "boolean"
},
"is_to_sequence_lines": {
"type": "boolean"
},
"override_on_hold": {
"type": "boolean"
},
"recalculate_prices": {
"type": "boolean"
},
"apply_available_document_discount_percent": {
"type": "boolean"
},
"lock_id": {
"type": "integer",
"format": "int64",
"readOnly": true
},
"customer_delivery_address_id": {
"type": "integer",
"format": "int64"
},
"suppress_warnings": {
"type": "boolean"
},
"document_no": {
"type": "string",
"maxLength": 20
},
"customer_type": {
"type": "string",
"maxLength": 50
},
"document_date": {
"type": "string",
"format": "date-time"
},
"document_status": {
"type": "string",
"maxLength": 20,
"readOnly": true
},
"despatch_receipt_status": {
"type": "string",
"maxLength": 20,
"readOnly": true
},
"invoice_credit_status": {
"type": "string",
"maxLength": 20,
"readOnly": true
},
"cancelled_status": {
"type": "string",
"maxLength": 20,
"readOnly": true
},
"currency_id": {
"type": "integer",
"format": "int64",
"readOnly": true
},
"exchange_rate": {
"type": "number",
"format": "decimal 6dp"
},
"subtotal_goods_value": {
"type": "number",
"format": "decimal 2dp",
"readOnly": true
},
"subtotal_charge_net_value": {
"type": "number",
"format": "decimal 2dp",
"readOnly": true
},
"subtotal_charge_tax_value": {
"type": "number",
"format": "decimal 2dp",
"readOnly": true
},
"subtotal_discount_value": {
"type": "number",
"format": "decimal 2dp",
"readOnly": true
},
"total_net_value": {
"type": "number",
"format": "decimal 2dp",
"readOnly": true
},
"total_tax_value": {
"type": "number",
"format": "decimal 2dp",
"readOnly": true
},
"total_gross_value": {
"type": "number",
"format": "decimal 2dp",
"readOnly": true
},
"customer_document_no": {
"type": "string",
"maxLength": 30
},
"is_credit_limit_exceeded": {
"type": "boolean",
"readOnly": true
},
"use_invoice_address": {
"type": "boolean"
},
"is_triangulated": {
"type": "boolean"
},
"settlement_discount_days": {
"type": "integer",
"format": "int16"
},
"settlement_discount_percent": {
"type": "number",
"format": "decimal 2dp"
},
"document_discount_percent": {
"type": "number",
"format": "decimal 2dp"
},
"available_document_discount_percent": {
"type": "number",
"format": "decimal 2dp",
"readOnly": true
},
"document_created_by": {
"type": "string",
"maxLength": 30
},
"requested_delivery_date": {
"type": "string",
"format": "date-time"
},
"promised_delivery_date": {
"type": "string",
"format": "date-time"
},
"quotation_expiry_date": {
"type": "string",
"format": "date-time"
},
"order_priority": {
"type": "string",
"maxLength": 1
},
"external_reference": {
"type": "string",
"maxLength": 20,
"readOnly": true
},
"payment_with_order": {
"type": "boolean"
},
"payment_type": {
"type": "string",
"maxLength": 20
},
"invoice_payment_with_order_immediately": {
"type": "boolean"
},
"payment_value": {
"type": "number",
"format": "decimal 2dp"
},
"payment_reference": {
"type": "string",
"maxLength": 20
},
"payment_method_id": {
"type": "integer",
"format": "int64"
},
"payment_declared": {
"type": "number",
"format": "decimal 2dp",
"readOnly": true
},
"payment_undeclared": {
"type": "number",
"format": "decimal 2dp",
"readOnly": true
},
"declared_payment_remaining": {
"type": "number",
"format": "decimal 2dp",
"readOnly": true
},
"analysis_code_1": {
"type": "string",
"maxLength": 60
},
"analysis_code_2": {
"type": "string",
"maxLength": 60
},
"analysis_code_3": {
"type": "string",
"maxLength": 60
},
"analysis_code_4": {
"type": "string",
"maxLength": 60
},
"analysis_code_5": {
"type": "string",
"maxLength": 60
},
"analysis_code_6": {
"type": "string",
"maxLength": 60
},
"analysis_code_7": {
"type": "string",
"maxLength": 60
},
"analysis_code_8": {
"type": "string",
"maxLength": 60
},
"analysis_code_9": {
"type": "string",
"maxLength": 60
},
"analysis_code_10": {
"type": "string",
"maxLength": 60
},
"analysis_code_11": {
"type": "string",
"maxLength": 60
},
"analysis_code_12": {
"type": "string",
"maxLength": 60
},
"analysis_code_13": {
"type": "string",
"maxLength": 60
},
"analysis_code_14": {
"type": "string",
"maxLength": 60
},
"analysis_code_15": {
"type": "string",
"maxLength": 60
},
"analysis_code_16": {
"type": "string",
"maxLength": 60
},
"analysis_code_17": {
"type": "string",
"maxLength": 60
},
"analysis_code_18": {
"type": "string",
"maxLength": 60
},
"analysis_code_19": {
"type": "string",
"maxLength": 60
},
"analysis_code_20": {
"type": "string",
"maxLength": 60
},
"spare_text_1": {
"type": "string",
"maxLength": 100
},
"spare_text_2": {
"type": "string",
"maxLength": 100
},
"spare_text_3": {
"type": "string",
"maxLength": 100
},
"spare_text_4": {
"type": "string",
"maxLength": 100
},
"spare_text_5": {
"type": "string",
"maxLength": 100
},
"spare_text_6": {
"type": "string",
"maxLength": 100
},
"spare_text_7": {
"type": "string",
"maxLength": 100
},
"spare_text_8": {
"type": "string",
"maxLength": 100
},
"spare_text_9": {
"type": "string",
"maxLength": 100
},
"spare_text_10": {
"type": "string",
"maxLength": 100
},
"spare_number_1": {
"type": "number",
"format": "decimal 5dp"
},
"spare_number_2": {
"type": "number",
"format": "decimal 5dp"
},
"spare_number_3": {
"type": "number",
"format": "decimal 5dp"
},
"spare_number_4": {
"type": "number",
"format": "decimal 5dp"
},
"spare_number_5": {
"type": "number",
"format": "decimal 5dp"
},
"spare_number_6": {
"type": "number",
"format": "decimal 5dp"
},
"spare_number_7": {
"type": "number",
"format": "decimal 5dp"
},
"spare_number_8": {
"type": "number",
"format": "decimal 5dp"
},
"spare_number_9": {
"type": "number",
"format": "decimal 5dp"
},
"spare_number_10": {
"type": "number",
"format": "decimal 5dp"
},
"spare_date_1": {
"type": "string",
"format": "date-time"
},
"spare_date_2": {
"type": "string",
"format": "date-time"
},
"spare_date_3": {
"type": "string",
"format": "date-time"
},
"spare_date_4": {
"type": "string",
"format": "date-time"
},
"spare_date_5": {
"type": "string",
"format": "date-time"
},
"spare_bool_1": {
"type": "boolean"
},
"spare_bool_2": {
"type": "boolean"
},
"spare_bool_3": {
"type": "boolean"
},
"spare_bool_4": {
"type": "boolean"
},
"spare_bool_5": {
"type": "boolean"
},
"cash_account_invoice_address": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64",
"readOnly": true
},
"postal_name": {
"type": "string",
"maxLength": 60
},
"address_1": {
"type": "string",
"maxLength": 60
},
"address_2": {
"type": "string",
"maxLength": 60
},
"address_3": {
"type": "string",
"maxLength": 60
},
"address_4": {
"type": "string",
"maxLength": 60
},
"city": {
"type": "string",
"maxLength": 60
},
"county": {
"type": "string",
"maxLength": 60
},
"country": {
"type": "string",
"maxLength": 60
},
"postcode": {
"type": "string",
"maxLength": 10
},
"date_time_created": {
"type": "string",
"format": "date-time",
"readOnly": true
},
"date_time_updated": {
"type": "string",
"format": "date-time",
"readOnly": true
}
}
},
"currency": {
"type": "object",
"readOnly": true
},
"customer": {
"type": "object",
"readOnly": true
},
"delivery_address": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64",
"readOnly": true
},
"postal_name": {
"type": "string",
"maxLength": 60
},
"address_1": {
"type": "string",
"maxLength": 60
},
"address_2": {
"type": "string",
"maxLength": 60
},
"address_3": {
"type": "string",
"maxLength": 60
},
"address_4": {
"type": "string",
"maxLength": 60
},
"city": {
"type": "string",
"maxLength": 60
},
"county": {
"type": "string",
"maxLength": 60
},
"country": {
"type": "string",
"maxLength": 60
},
"postcode": {
"type": "string",
"maxLength": 10
},
"contact": {
"type": "string",
"maxLength": 235
},
"telephone_number": {
"type": "string",
"maxLength": 30
},
"fax_number": {
"type": "string",
"maxLength": 30
},
"email_address": {
"type": "string",
"maxLength": 255
},
"tax_number": {
"type": "string",
"maxLength": 30
},
"tax_code_id": {
"type": "integer",
"format": "int64"
},
"country_code_id": {
"type": "integer",
"format": "int64"
},
"tax_code": {
"type": "object"
},
"country_code": {
"type": "object"
},
"date_time_created": {
"type": "string",
"format": "date-time",
"readOnly": true
},
"date_time_updated": {
"type": "string",
"format": "date-time",
"readOnly": true
}
}
},
"payment_method": {
"type": "object",
"readOnly": true
},
"payment_status": {
"type": "object",
"readOnly": true,
"properties": {
"is_partially_invoiced": {
"type": "boolean",
"readOnly": true
},
"is_amendable": {
"type": "boolean",
"readOnly": true
},
"is_reference_amendable": {
"type": "boolean",
"readOnly": true
},
"is_payment_method_amendable": {
"type": "boolean",
"readOnly": true
}
}
},
"profitability": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64",
"readOnly": true
},
"sop_order_return_id": {
"type": "integer",
"format": "int64"
},
"estimated_cost_value": {
"type": "number",
"format": "decimal 5dp"
},
"estimated_profit_percent_on_revenue": {
"type": "number",
"format": "decimal 5dp"
},
"estimated_profit_percent_on_cost": {
"type": "number",
"format": "decimal 5dp"
},
"estimated_profit_value": {
"type": "number",
"format": "decimal 5dp"
},
"issue_value": {
"type": "number",
"format": "decimal 5dp"
},
"realised_cost_value": {
"type": "number",
"format": "decimal 5dp"
},
"realised_issue_value": {
"type": "number",
"format": "decimal 5dp"
},
"realised_profit_percent_on_revenue": {
"type": "number",
"format": "decimal 5dp"
},
"realised_profit_percent_on_cost": {
"type": "number",
"format": "decimal 5dp"
},
"realised_profit_value": {
"type": "number",
"format": "decimal 5dp"
},
"simple_profit_calculation_only": {
"type": "boolean"
},
"stock_item_order_lines": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int32",
"readOnly": true
},
"sop_order_profit_analysis_id": {
"type": "integer",
"format": "int64"
},
"sop_order_return_line_id": {
"type": "integer",
"format": "int64"
},
"item_code": {
"type": "string",
"maxLength": 60,
"readOnly": true
},
"item_description": {
"type": "string",
"maxLength": 1000,
"readOnly": true
},
"traceable_type": {
"type": "string",
"maxLength": 50,
"readOnly": true
},
"line_type": {
"type": "string",
"maxLength": 20
},
"estimated_cost_rate": {
"type": "number",
"format": "decimal 5dp"
},
"estimated_profit_percent_on_revenue": {
"type": "number",
"format": "decimal 5dp"
},
"estimated_profit_percent_on_cost": {
"type": "number",
"format": "decimal 5dp"
},
"estimated_profit_value": {
"type": "number",
"format": "decimal 5dp"
},
"issue_rate": {
"type": "number",
"format": "decimal 5dp"
},
"line_quantity": {
"type": "number",
"format": "decimal 5dp"
},
"realised_cost_rate": {
"type": "number",
"format": "decimal 5dp"
},
"realised_cost_value": {
"type": "number",
"format": "decimal 5dp"
},
"realised_profit_percent_on_revenue": {
"type": "number",
"format": "decimal 5dp"
},
"realised_profit_percent_on_cost": {
"type": "number",
"format": "decimal 5dp"
},
"realised_profit_value": {
"type": "number",
"format": "decimal 5dp"
},
"realised_quantity": {
"type": "number",
"format": "decimal 5dp"
},
"date_time_created": {
"type": "string",
"format": "date-time",
"readOnly": true
},
"date_time_updated": {
"type": "string",
"format": "date-time",
"readOnly": true
}
}
}
},
"other_order_lines": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int32",
"readOnly": true
},
"sop_order_profit_analysis_id": {
"type": "integer",
"format": "int64"
},
"sop_order_return_line_id": {
"type": "integer",
"format": "int64"
},
"item_code": {
"type": "string",
"maxLength": 60,
"readOnly": true
},
"item_description": {
"type": "string",
"maxLength": 1000,
"readOnly": true
},
"traceable_type": {
"type": "string",
"maxLength": 50,
"readOnly": true
},
"line_type": {
"type": "string",
"maxLength": 20
},
"estimated_cost_rate": {
"type": "number",
"format": "decimal 5dp"
},
"estimated_profit_percent_on_revenue": {
"type": "number",
"format": "decimal 5dp"
},
"estimated_profit_percent_on_cost": {
"type": "number",
"format": "decimal 5dp"
},
"estimated_profit_value": {
"type": "number",
"format": "decimal 5dp"
},
"issue_rate": {
"type": "number",
"format": "decimal 5dp"
},
"line_quantity": {
"type": "number",
"format": "decimal 5dp"
},
"realised_cost_rate": {
"type": "number",
"format": "decimal 5dp"
},
"realised_cost_value": {
"type": "number",
"format": "decimal 5dp"
},
"realised_profit_percent_on_revenue": {
"type": "number",
"format": "decimal 5dp"
},
"realised_profit_percent_on_cost": {
"type": "number",
"format": "decimal 5dp"
},
"realised_profit_value": {
"type": "number",
"format": "decimal 5dp"
},
"realised_quantity": {
"type": "number",
"format": "decimal 5dp"
},
"date_time_created": {
"type": "string",
"format": "date-time",
"readOnly": true
},
"date_time_updated": {
"type": "string",
"format": "date-time",
"readOnly": true
}
}
}
},
"date_time_created": {
"type": "string",
"format": "date-time",
"readOnly": true
},
"date_time_updated": {
"type": "string",
"format": "date-time",
"readOnly": true
}
},
"readOnly": true
},
"lines": {
"type": "array",
"items": {
"type": "object",
"required": [
"line_type",
"product_id",
"warehouse_id",
"code",
"description",
"line_quantity"
],
"properties": {
"id": {
"type": "integer",
"format": "int64",
"readOnly": true
},
"sop_order_id": {
"type": "integer",
"format": "int64",
"readOnly": true
},
"line_type": {
"type": "string",
"maxLength": 20
},
"product_id": {
"type": "integer",
"format": "int64"
},
"warehouse_id": {
"type": "integer",
"format": "int64"
},
"create_cancelled_line": {
"type": "boolean"
},
"is_to_split_line": {
"type": "boolean"
},
"code": {
"type": "string",
"maxLength": 30
},
"use_description": {
"type": "boolean"
},
"line_quantity": {
"type": "number",
"format": "decimal 5dp"
},
"to_allocate_quantity": {
"type": "number",
"format": "decimal 5dp"
},
"line_number": {
"type": "integer",
"format": "int16",
"readOnly": true
},
"tax_code_id": {
"type": "integer",
"format": "int64"
},
"nominal_reference": {
"type": "string",
"maxLength": 8
},
"nominal_cost_centre": {
"type": "string",
"maxLength": 3
},
"nominal_department": {
"type": "string",
"maxLength": 3
},
"allocated_quantity": {
"type": "number",
"format": "decimal 5dp"
},
"available_for_despatch": {
"type": "number",
"format": "decimal 5dp",
"readOnly": true
},
"despatch_receipt_quantity": {
"type": "number",
"format": "decimal 5dp",
"readOnly": true
},
"invoice_credit_quantity": {
"type": "number",
"format": "decimal 5dp",
"readOnly": true
},
"posted_invoice_credit_quantity": {
"type": "number",
"format": "decimal 5dp",
"readOnly": true
},
"stock_unit_line_quantity": {
"type": "number",
"format": "decimal 5dp",
"readOnly": true
},
"stock_unit_to_allocate_quantity": {
"type": "number",
"format": "decimal 5dp",
"readOnly": true
},
"stock_unit_allocated_quantity": {
"type": "number",
"format": "decimal 5dp",
"readOnly": true
},
"stock_unit_available_quantity": {
"type": "number",
"format": "decimal 5dp",
"readOnly": true
},
"stock_unit_available_for_despatch": {
"type": "number",
"format": "decimal 5dp",
"readOnly": true
},
"stock_unit_despatch_receipt_quantity": {
"type": "number",
"format": "decimal 5dp",
"readOnly": true
},
"stock_unit_invoice_credit_quantity": {
"type": "number",
"format": "decimal 5dp",
"readOnly": true
},
"stock_unit_posted_invoice_credit_quantity": {
"type": "number",
"format": "decimal 5dp",
"readOnly": true
},
"allocation_status": {
"type": "string",
"maxLength": 20,
"readOnly": true
},
"despatch_receipt_status": {
"type": "string",
"maxLength": 20,
"readOnly": true
},
"invoice_credit_status": {
"type": "string",
"maxLength": 20,
"readOnly": true
},
"selling_unit_id": {
"type": "integer",
"format": "int64"
},
"selling_unit_description": {
"type": "string",
"maxLength": 20
},
"selling_unit_price": {
"type": "number",
"format": "decimal 5dp"
},
"selling_unit_price_overridden": {
"type": "boolean"
},
"pricing_unit_id": {
"type": "integer",
"format": "int64"
},
"pricing_unit_description": {
"type": "string",
"maxLength": 20
},
"line_unit_precision": {
"type": "number",
"format": "decimal 5dp",
"readOnly": true
},
"stock_unit_precision": {
"type": "number",
"format": "decimal 5dp",
"readOnly": true
},
"selling_unit_multiple": {
"type": "number",
"format": "decimal 7dp",
"readOnly": true
},
"stock_unit_multiple": {
"type": "number",
"format": "decimal 7dp",
"readOnly": true
},
"unit_discount_percent": {
"type": "number",
"format": "decimal 2dp"
},
"discount_percent_specified": {
"type": "boolean"
},
"unit_discount_value": {
"type": "number",
"format": "decimal 5dp"
},
"unit_discount_overridden": {
"type": "boolean"
},
"discounted_unit_price": {
"type": "number",
"format": "decimal 2dp"
},
"cost_price": {
"type": "number",
"format": "decimal 5dp"
},
"retain_manual_prices": {
"type": "boolean"
},
"fulfilment_method": {
"type": "string",
"maxLength": 50
},
"confirmation_intent_type": {
"type": "string",
"maxLength": 50
},
"mark_as_preferred": {
"type": "boolean"
},
"line_tax_value": {
"type": "number",
"format": "decimal 2dp",
"readOnly": true
},
"line_total_value": {
"type": "number",
"format": "decimal 2dp",
"readOnly": true
},
"requested_delivery_date": {
"type": "string",
"format": "date-time"
},
"promised_delivery_date": {
"type": "string",
"format": "date-time"
},
"picking_list_comment": {
"type": "string",
"maxLength": 160
},
"despatch_note_comment": {
"type": "string",
"maxLength": 160
},
"show_on_customer_docs": {
"type": "boolean"
},
"show_on_picking_list_type": {
"type": "string",
"maxLength": 20
},
"has_pop_order": {
"type": "boolean",
"readOnly": true
},
"back_to_back_status": {
"type": "string",
"maxLength": 20,
"readOnly": true
},
"is_complete": {
"type": "boolean",
"readOnly": true
},
"is_line_deletable": {
"type": "boolean",
"readOnly": true
},
"analysis_code_1": {
"type": "string",
"maxLength": 60
},
"analysis_code_2": {
"type": "string",
"maxLength": 60
},
"analysis_code_3": {
"type": "string",
"maxLength": 60
},
"analysis_code_4": {
"type": "string",
"maxLength": 60
},
"analysis_code_5": {
"type": "string",
"maxLength": 60
},
"analysis_code_6": {
"type": "string",
"maxLength": 60
},
"analysis_code_7": {
"type": "string",
"maxLength": 60
},
"analysis_code_8": {
"type": "string",
"maxLength": 60
},
"analysis_code_9": {
"type": "string",
"maxLength": 60
},
"analysis_code_10": {
"type": "string",
"maxLength": 60
},
"analysis_code_11": {
"type": "string",
"maxLength": 60
},
"analysis_code_12": {
"type": "string",
"maxLength": 60
},
"analysis_code_13": {
"type": "string",
"maxLength": 60
},
"analysis_code_14": {
"type": "string",
"maxLength": 60
},
"analysis_code_15": {
"type": "string",
"maxLength": 60
},
"analysis_code_16": {
"type": "string",
"maxLength": 60
},
"analysis_code_17": {
"type": "string",
"maxLength": 60
},
"analysis_code_18": {
"type": "string",
"maxLength": 60
},
"analysis_code_19": {
"type": "string",
"maxLength": 60
},
"analysis_code_20": {
"type": "string",
"maxLength": 60
},
"spare_text_1": {
"type": "string",
"maxLength": 100
},
"spare_text_2": {
"type": "string",
"maxLength": 100
},
"spare_text_3": {
"type": "string",
"maxLength": 100
},
"spare_text_4": {
"type": "string",
"maxLength": 100
},
"spare_text_5": {
"type": "string",
"maxLength": 100
},
"spare_text_6": {
"type": "string",
"maxLength": 100
},
"spare_text_7": {
"type": "string",
"maxLength": 100
},
"spare_text_8": {
"type": "string",
"maxLength": 100
},
"spare_text_9": {
"type": "string",
"maxLength": 100
},
"spare_text_10": {
"type": "string",
"maxLength": 100
},
"spare_number_1": {
"type": "number",
"format": "decimal 5dp"
},
"spare_number_2": {
"type": "number",
"format": "decimal 5dp"
},
"spare_number_3": {
"type": "number",
"format": "decimal 5dp"
},
"spare_number_4": {
"type": "number",
"format": "decimal 5dp"
},
"spare_number_5": {
"type": "number",
"format": "decimal 5dp"
},
"spare_number_6": {
"type": "number",
"format": "decimal 5dp"
},
"spare_number_7": {
"type": "number",
"format": "decimal 5dp"
},
"spare_number_8": {
"type": "number",
"format": "decimal 5dp"
},
"spare_number_9": {
"type": "number",
"format": "decimal 5dp"
},
"spare_number_10": {
"type": "number",
"format": "decimal 5dp"
},
"spare_date_1": {
"type": "string",
"format": "date-time"
},
"spare_date_2": {
"type": "string",
"format": "date-time"
},
"spare_date_3": {
"type": "string",
"format": "date-time"
},
"spare_date_4": {
"type": "string",
"format": "date-time"
},
"spare_date_5": {
"type": "string",
"format": "date-time"
},
"spare_bool_1": {
"type": "boolean"
},
"spare_bool_2": {
"type": "boolean"
},
"spare_bool_3": {
"type": "boolean"
},
"spare_bool_4": {
"type": "boolean"
},
"spare_bool_5": {
"type": "boolean"
},
"additional_charge": {
"type": "object",
"readOnly": true
},
"discount": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int32",
"readOnly": true
},
"sop_order_return_line_id": {
"type": "integer",
"format": "int64",
"readOnly": true
},
"source_of_price_type": {
"type": "string",
"maxLength": 50,
"readOnly": true
},
"discount_name": {
"type": "string",
"maxLength": 50,
"readOnly": true
},
"currency_name": {
"type": "string",
"maxLength": 30,
"readOnly": true
},
"pricing_type": {
"type": "string",
"maxLength": 50,
"readOnly": true
},
"flat_rate_or_quantity_break_type": {
"type": "string",
"maxLength": 50,
"readOnly": true
},
"quantity_break_quantity": {
"type": "number",
"format": "decimal 5dp",
"readOnly": true
},
"quantity_break_amount": {
"type": "number",
"format": "decimal 5dp",
"readOnly": true
},
"discount_or_surcharge_type": {
"type": "string",
"maxLength": 50,
"readOnly": true
},
"value": {
"type": "number",
"format": "decimal 5dp",
"readOnly": true
},
"date_time_created": {
"type": "string",
"format": "date-time",
"readOnly": true
},
"date_time_updated": {
"type": "string",
"format": "date-time",
"readOnly": true
}
},
"readOnly": true
},
"nominal_code": {
"type": "object",
"readOnly": true
},
"pricing_unit": {
"type": "object",
"readOnly": true
},
"product": {
"type": "object",
"readOnly": true
},
"profitability": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int32",
"readOnly": true
},
"sop_order_profit_analysis_id": {
"type": "integer",
"format": "int64"
},
"sop_order_return_line_id": {
"type": "integer",
"format": "int64"
},
"item_code": {
"type": "string",
"maxLength": 60,
"readOnly": true
},
"item_description": {
"type": "string",
"maxLength": 1000,
"readOnly": true
},
"traceable_type": {
"type": "string",
"maxLength": 50,
"readOnly": true
},
"line_type": {
"type": "string",
"maxLength": 20
},
"estimated_cost_rate": {
"type": "number",
"format": "decimal 5dp"
},
"estimated_profit_percent_on_revenue": {
"type": "number",
"format": "decimal 5dp"
},
"estimated_profit_percent_on_cost": {
"type": "number",
"format": "decimal 5dp"
},
"estimated_profit_value": {
"type": "number",
"format": "decimal 5dp"
},
"issue_rate": {
"type": "number",
"format": "decimal 5dp"
},
"line_quantity": {
"type": "number",
"format": "decimal 5dp"
},
"realised_cost_rate": {
"type": "number",
"format": "decimal 5dp"
},
"realised_cost_value": {
"type": "number",
"format": "decimal 5dp"
},
"realised_profit_percent_on_revenue": {
"type": "number",
"format": "decimal 5dp"
},
"realised_profit_percent_on_cost": {
"type": "number",
"format": "decimal 5dp"
},
"realised_profit_value": {
"type": "number",
"format": "decimal 5dp"
},
"realised_quantity": {
"type": "number",
"format": "decimal 5dp"
},
"date_time_created": {
"type": "string",
"format": "date-time",
"readOnly": true
},
"date_time_updated": {
"type": "string",
"format": "date-time",
"readOnly": true
}
},
"readOnly": true
},
"selling_unit": {
"type": "object",
"readOnly": true
},
"sop_order": {
"type": "object",
"readOnly": true
},
"tax_code": {
"type": "object",
"readOnly": true
},
"warehouse": {
"type": "object",
"readOnly": true
},
"traceable_adjustment_items": {
"type": "array",
"items": {
"type": "object",
"required": [
"traceable_item_id",
"traceable_bin_item_id",
"traceable_allocation_balance_id",
"quantity",
"is_selected"
],
"properties": {
"traceable_item_id": {
"type": "integer",
"format": "int64",
"readOnly": true
},
"identification_no": {
"type": "string",
"maxLength": 30,
"readOnly": true
},
"quantity": {
"type": "number",
"format": "decimal 5dp"
},
"is_selected": {
"type": "boolean"
},
"original_quantity": {
"type": "number",
"format": "decimal 5dp",
"readOnly": true
},
"available_quantity": {
"type": "number",
"format": "decimal 5dp",
"readOnly": true
},
"allocation_quantity": {
"type": "number",
"format": "decimal 5dp",
"readOnly": true
},
"despatched_quantity": {
"type": "number",
"format": "decimal 5dp",
"readOnly": true
},
"supplier_reference": {
"type": "string",
"maxLength": 8,
"readOnly": true
},
"receipt_date": {
"type": "string",
"format": "date-time",
"readOnly": true
},
"allocated_to_who_type": {
"type": "string",
"maxLength": 20,
"readOnly": true
},
"additional_reference": {
"type": "string",
"maxLength": 30,
"readOnly": true
},
"sell_by_date": {
"type": "string",
"format": "date-time",
"readOnly": true
},
"use_by_date": {
"type": "string",
"format": "date-time",
"readOnly": true
},
"traceable_bin_item_id": {
"type": "integer",
"format": "int64",
"readOnly": true
},
"bin_item_id": {
"type": "integer",
"format": "int64",
"readOnly": true
},
"bin_name": {
"type": "string",
"maxLength": 20,
"readOnly": true
},
"sop_allocation_line_id": {
"type": "integer",
"format": "int64",
"readOnly": true
},
"sop_allocation_line_quantity": {
"type": "number",
"format": "decimal 5dp",
"readOnly": true
},
"traceable_allocation_balance_id": {
"type": "integer",
"format": "int64",
"readOnly": true
},
"is_allocated": {
"type": "boolean",
"readOnly": true
},
"is_selectable": {
"type": "boolean",
"readOnly": true
}
}
}
},
"is_to_delete": {
"type": "boolean"
},
"date_time_created": {
"type": "string",
"format": "date-time",
"readOnly": true
},
"date_time_updated": {
"type": "string",
"format": "date-time",
"readOnly": true
}
}
}
},
"memos": {
"type": "array",
"items": {
"type": "object",
"required": [
"sop_order_return_id"
],
"properties": {
"id": {
"type": "integer",
"format": "int64",
"readOnly": true
},
"sop_order_return_id": {
"type": "integer",
"format": "int64"
},
"is_active": {
"type": "boolean"
},
"note": {
"type": "string",
"maxLength": 1000
},
"is_to_delete": {
"type": "boolean"
},
"created_by": {
"type": "string",
"maxLength": 20,
"readOnly": true
},
"date_time_created": {
"type": "string",
"format": "date-time",
"readOnly": true
},
"date_time_updated": {
"type": "string",
"format": "date-time",
"readOnly": true
}
}
}
},
"date_time_created": {
"type": "string",
"format": "date-time",
"readOnly": true
},
"date_time_updated": {
"type": "string",
"format": "date-time",
"readOnly": true
}
}
}
}