{
"actions": {
"POST": {
"id": {
"type": "integer",
"required": false,
"read_only": false,
"label": "ID"
},
"revision_display": {
"type": "field",
"required": false,
"read_only": true,
"label": "Revision display"
},
"revision": {
"type": "integer",
"required": false,
"read_only": true,
"label": "Revision"
},
"sub_revision": {
"type": "integer",
"required": false,
"read_only": true,
"label": "Sub Revision"
},
"user_editable": {
"type": "field",
"required": false,
"read_only": true,
"label": "User editable"
},
"revision_editable": {
"type": "field",
"required": false,
"read_only": true,
"label": "Revision editable"
},
"status": {
"type": "choice",
"required": false,
"read_only": true,
"label": "Status"
},
"status_name": {
"type": "field",
"required": false,
"read_only": true,
"label": "Status name"
},
"approval_status": {
"type": "choice",
"required": false,
"read_only": true,
"label": "Approval Status"
},
"approval_status_name": { // ADDED
"type": "field",
"required": false,
"read_only": true,
"label": "Approval Status name"
},
"approval_flow": { // NOTE: See also: `approval_flow_instruction` field for more info.
"type": "field",
"required": true,
"read_only": false,
"label": "Approval Flow"
},
"approval_flow_instruction": {
"type": "field",
"required": false,
"read_only": true,
"label": "Approval flow instruction",
"child": {
"type": "nested object",
"required": false,
"read_only": true,
"children": {
"approver": {
"type": "field",
"required": true,
"read_only": false,
"label": "Approver",
"choices": [
{
"display_name": "AAAA - ปวริศ แสงปรีชารัตน์ 1",
"value": "3"
},
{
"display_name": "AAAB - ปวริศ แสงปรีชารัตน์ 2",
"value": "2"
},
{
"display_name": "admin (Superuser)",
"value": "1"
}
]
},
"role": {
"type": "choice",
"required": true,
"read_only": false,
"label": "Role",
"choices": [
{
"display_name": "Requester",
"value": 1
},
{
"display_name": "Owner",
"value": 2
},
{
"display_name": "Approver",
"value": 3
}
]
},
"approved_date": {
"type": "datetime",
"required": false,
"read_only": false,
"label": "Approved Date"
}
}
}
},
// NOTE: According to `requester_name`, `owner_name` and `assistant_name` field, please specify as '-' (dash) when the `requester`, `owner` and `assistant` field are respectively left blank.
"preparer": {
"type": "field",
"required": true,
"read_only": false,
"label": "Preparer",
"choices": [
{
"display_name": "AAAA - ปวริศ แสงปรีชารัตน์ 1",
"value": "3"
},
{
"display_name": "AAAB - ปวริศ แสงปรีชารัตน์ 2",
"value": "2"
},
{
"display_name": "admin (Superuser)",
"value": "1"
}
]
},
"preparer_name": { // ADDED
"type": "string", // *
"required": false,
"read_only": true,
"label": "Preparer name"
},
"owner": {
"type": "field",
"required": true,
"read_only": false,
"label": "Owner",
"choices": [
{
"display_name": "AAAA - ปวริศ แสงปรีชารัตน์ 1",
"value": "3"
},
{
"display_name": "AAAB - ปวริศ แสงปรีชารัตน์ 2",
"value": "2"
},
{
"display_name": "admin (Superuser)",
"value": "1"
}
]
},
"owner_name": { // ADDED
"type": "string", // *
"required": false,
"read_only": true,
"label": "Owner name"
},
"assistant": {
"type": "field",
"required": false,
"read_only": false,
"label": "Assistant",
"choices": [
{
"display_name": "AAAA - ปวริศ แสงปรีชารัตน์ 1",
"value": "3"
},
{
"display_name": "AAAB - ปวริศ แสงปรีชารัตน์ 2",
"value": "2"
},
{
"display_name": "admin (Superuser)",
"value": "1"
}
]
},
"assistant_name": { // ADDED
"type": "string", // *
"required": false,
"read_only": true,
"label": "Assistant name"
},
"numbering_code": {
"type": "field",
"required": true,
"read_only": false,
"label": "Numbering code",
"choices": [
{
"display_name": "A",
"value": "2"
}
]
},
"no": { // ADDED
"type": "string",
"required": true,
"read_only": false,
"label": "No.",
"max_length": 50
},
"company": {
"type": "field",
"required": true,
"read_only": false,
"label": "Company",
"choices": [
{
"display_name": "COM01 - บริษัท 1",
"value": "1"
},
{
"display_name": "COM02 - บริษัท 2",
"value": "2"
}
]
},
"company_name": { // ADDED
"type": "string", // *
"required": false,
"read_only": true,
"label": "Company name"
},
"company_address": { // ADDED
"type": "string", // *
"required": false,
"read_only": true,
"label": "Company Address"
},
"company_tax_id": { // ADDED
"type": "string", // *
"required": false,
"read_only": true,
"label": "Company Tax ID"
},
"date": {
"type": "date",
"required": true,
"read_only": false,
"label": "Date"
},
"date_long": { // ADDED
"type": "string", // *
"required": false,
"read_only": true,
"label": "Date long"
},
"sensitivity_level": {
"type": "choice",
"required": true,
"read_only": false,
"label": "Sensitivity Level",
"choices": [
{
"display_name": "Official",
"value": 1
},
{
"display_name": "Restricted",
"value": 2
},
{
"display_name": "Confidential",
"value": 3
},
{
"display_name": "Secret",
"value": 4
},
{
"display_name": "Top Secret",
"value": 5
}
]
},
"sensitivity_level_name": { // ADDED
"type": "string", // *
"required": false,
"read_only": true,
"label": "Sensitivity Level name"
},
"external_ref_no": {
"type": "string",
"required": false,
"read_only": false,
"label": "External Ref No.",
"max_length": 20
},
"ref_document_id": {
"type": "integer",
"required": true,
"read_only": false,
"label": "Ref Document No.",
"min_value": 0,
"max_value": 2147483647
},
"ref_document_no": { // ADDED
"type": "string", // *
"required": false,
"read_only": true,
"label": "Ref Document name"
},
"ref_document_type": {
"type": "field",
"required": true,
"read_only": false,
"label": "Ref Document Type",
"choices": [
{
"display_name": "user",
"value": "1"
},
{
"display_name": "log entry",
"value": "2"
},
{
"display_name": "permission",
"value": "3"
},
{
"display_name": "group",
"value": "4"
},
{
"display_name": "content type",
"value": "5"
},
{
"display_name": "session",
"value": "6"
},
{
"display_name": "cors model",
"value": "7"
},
{
"display_name": "company",
"value": "8"
},
{
"display_name": "employee",
"value": "9"
},
{
"display_name": "access permission",
"value": "10"
},
{
"display_name": "business unit",
"value": "11"
},
{
"display_name": "payment term",
"value": "12"
},
{
"display_name": "warehouse",
"value": "13"
},
{
"display_name": "storage bin",
"value": "14"
},
{
"display_name": "loading dock",
"value": "15"
},
{
"display_name": "chart of account",
"value": "16"
},
{
"display_name": "pricing type",
"value": "17"
},
{
"display_name": "master contract",
"value": "18"
},
{
"display_name": "partner",
"value": "19"
},
{
"display_name": "shipping address",
"value": "20"
},
{
"display_name": "contact person",
"value": "21"
},
{
"display_name": "contract",
"value": "22"
},
{
"display_name": "product group",
"value": "23"
},
{
"display_name": "unit of measurement",
"value": "24"
},
{
"display_name": "product",
"value": "25"
},
{
"display_name": "selling price",
"value": "26"
},
{
"display_name": "purchasing price",
"value": "27"
},
{
"display_name": "selling unit price",
"value": "28"
},
{
"display_name": "purchasing unit price",
"value": "29"
},
{
"display_name": "document numbering",
"value": "30"
},
{
"display_name": "sale order",
"value": "31"
},
{
"display_name": "sale order log",
"value": "32"
},
{
"display_name": "product quantity",
"value": "33"
},
{
"display_name": "cash account",
"value": "34"
},
{
"display_name": "document",
"value": "35"
},
{
"display_name": "document log",
"value": "36"
},
{
"display_name": "document payment amount",
"value": "37"
},
{
"display_name": "document product quantity",
"value": "38"
}
]
},
"customer": { // ADDED
"type": "field",
"required": true,
"read_only": false,
"label": "Customer",
"choices": [
{
"display_name": "1 - บริษัท 91",
"value": "1"
},
{
"display_name": "2 - บริษัท 92",
"value": "2"
}
]
},
"customer_name": { // ADDED
"type": "string",
"required": false,
"read_only": true,
"label": "Customer name"
},
"customer_tax_id": { // ADDED
"type": "string",
"required": false,
"read_only": false,
"label": "Customer Tax ID",
"max_length": 25
},
"customer_address": { // ADDED
"type": "string",
"required": false,
"read_only": false,
"label": "Customer address",
"max_length": 255
},
"delivery_point": { // ADDED
"type": "field",
"required": true,
"read_only": false,
"label": "Delivery point",
"child": {
"type": "nested object",
"required": true,
"read_only": false,
"children": {
"address_id": {
"type": "integer",
"required": false,
"read_only": false,
"label": "Delivery Point ID"
},
"address_type": {
"type": "choice",
"required": false,
"read_only": false,
"label": "Type",
"choices": [
{
"display_name": "Company Warehouse",
"value": 13
},
{
"display_name": "Customer Shipping Address",
"value": 20
},
]
},
"address": {
"type": "number",
"required": false,
"read_only": true,
"label": "Delivery Point Address",
},
}
}
},
"payment_term": { // ADDED
"type": "field",
"required": true,
"read_only": false,
"label": "Payment Term",
"choices": [
{
"display_name": "10/15 N/30",
"value": "1"
},
{
"display_name": "PIA 01",
"value": "2"
},
{
"display_name": "15/15 N/25",
"value": "3"
},
{
"display_name": "10/25",
"value": "4"
}
]
},
"payment_term_name": { // ADDED
"type": "string",
"required": false,
"read_only": true,
"label": "Payment term name",
},
"delivery_term": {
"type": "choice",
"required": false,
"read_only": false,
"label": "Delivery Term",
"choices": [
{
"display_name": "Ex Work",
"value": "EXW"
},
{
"display_name": "Free Carrier",
"value": "FCA"
},
{
"display_name": "Carriage Paid to",
"value": "CPT"
},
{
"display_name": "Carriage and Insurance Paid to",
"value": "CIP"
},
{
"display_name": "Delivered at Terminal",
"value": "DAT"
},
{
"display_name": "Delivered at Place",
"value": "DAP"
},
{
"display_name": "Delivered Duty Paid",
"value": "DDP"
},
{
"display_name": "Free Alongside Ship",
"value": "FAS"
},
{
"display_name": "Free on Board",
"value": "FOB"
},
{
"display_name": "Cost and Freight",
"value": "CFR"
},
{
"display_name": "Cost, Insurance and Freight",
"value": "CIF"
}
]
},
"type": {
"type": "choice",
"required": true,
"read_only": false,
"label": "Document Type",
"choices": [
{
"display_name": "SO-PIA-Payment Receipt",
"value": 1
},
{
"display_name": "SO-PIA-Payment Receipt | Tax invoice(ABB)",
"value": 2
},
{
"display_name": "SO-PIA-Payment Receipt | Tax invoice",
"value": 3
},
{
"display_name": "SO-PIA-Delivery Note",
"value": 4
},
{
"display_name": "SO-COD-Delivery Note | Payment Receipt",
"value": 5
},
{
"display_name": "SO-COD-Delivery Note | Payment Receipt | Tax invoice(ABB)",
"value": 6
},
{
"display_name": "SO-COD-Delivery Note | Payment Receipt | Tax invoice",
"value": 7
},
{
"display_name": "SO-PAI-Delivery Note | Invoice",
"value": 8
},
{
"display_name": "SO-PAI-Delivery Note | Invoice | Tax invoice(ABB)",
"value": 9
},
{
"display_name": "SO-PAI-Delivery Note | Invoice | Tax invoice",
"value": 10
},
{
"display_name": "SO-PAI-Payment Receive",
"value": 11
}
]
},
"type_name": { // ADDED
"type": "string", // *
"required": false,
"read_only": true,
"label": "Document Type name"
},
"document_payment_amounts": {
"type": "field",
"required": false,
"read_only": false,
"label": "Document payment amounts",
"child": {
"type": "nested object",
"required": false,
"read_only": false,
"children": {
"id": {
"type": "integer",
"required": false,
"read_only": false,
"label": "ID"
},
"cash_account": {
"type": "field",
"required": true,
"read_only": false,
"label": "Cash account",
"choices": [
{
"display_name": "1234567890 - CASH_AC",
"value": "1"
}
]
},
"cash_account_name": { // ADDED
"type": "string", // *
"required": false,
"read_only": true,
"label": "Cash account name"
},
"method": {
"type": "choice",
"required": true,
"read_only": false,
"label": "Payment Method",
"choices": [
{
"display_name": "Cash",
"value": "1"
},
{
"display_name": "Debit Card",
"value": "2"
},
{
"display_name": "Credit Card",
"value": "3"
},
{
"display_name": "Money Transfer",
"value": "4"
},
{
"display_name": "Note Receivable",
"value": "5"
},
{
"display_name": "Note Payable",
"value": "6"
},
{
"display_name": "Withholding Tax",
"value": "7"
}
]
},
"method_name": { // ADDED
"type": "string", // *
"required": false,
"read_only": true,
"label": "Method name"
},
"amount": {
"type": "decimal",
"required": true,
"read_only": false,
"label": "Amount"
}
}
}
},
"payment_received_date": {
"type": "date",
"required": false,
"read_only": false,
"label": "Payment Received Date"
},
"payment_received_date_long": { // ADDED
"type": "string", // *
"required": false,
"read_only": true,
"label": "Payment Received Date long"
},
"remark": {
"type": "string",
"required": false,
"read_only": false,
"label": "Remark"
},
"document_product_quantities": {
"type": "field",
"required": false,
"read_only": false,
"label": "Document product quantities",
"child": {
"type": "nested object",
"required": false,
"read_only": false,
"children": {
"id": {
"type": "integer",
"required": false,
"read_only": false,
"label": "ID"
},
"quantity": {
"type": "integer",
"required": false, // MODIFIED, Change from required to optional
"read_only": false,
"label": "Quantity",
"min_value": -2147483648,
"max_value": 2147483647
},
"product": {
"type": "field",
"required": true,
"read_only": false,
"label": "Product",
"choices": [
{
"display_name": "1 - Product 1",
"value": "1"
},
{
"display_name": "2 - Product 2",
"value": "2"
}
]
},
"storage_bins": { // MODIFIED, Change from `storage_bin` to `storage_bins`
// MODIFIED, Changed from the common foreign key field to nested object
"type": "field",
"required": false,
"read_only": false,
"label": "Storage Bins",
"child": { // ADDED
"type": "nested object",
"required": false,
"read_only": false,
"children": {
"storage_bin": {
"type": "field",
"required": false,
"read_only": false,
"label": "Storage Bin",
"choices": [
{
"display_name": "SB1 - Storage bin 01",
"value": "1"
},
{
"display_name": "SB2 - Storage bin 02",
"value": "2"
},
{
"display_name": "SB01 - Storage bin 01",
"value": "3"
}
]
},
"quantity": {
"type": "integer",
"required": true, // *
"read_only": false,
"label": "Quantity",
"min_value": -2147483648,
"max_value": 2147483647
},
}
}
}
}
}
},
"discount": {
"type": "decimal",
"required": false,
"read_only": true,
"label": "Discount"
},
"sub_total": {
"type": "decimal",
"required": false,
"read_only": true,
"label": "Subtotal"
},
"tax": {
"type": "decimal",
"required": false,
"read_only": true,
"label": "Tax"
},
"grand_total": {
"type": "decimal",
"required": false,
"read_only": true,
"label": "Grand Total"
},
"grand_total_in_words": {
"type": "string",
"required": false,
"read_only": true,
"label": "Grand total in words"
},
"submit": {
"type": "boolean",
"required": false,
"read_only": false,
"label": "Submit"
},
}
}
}
The Sample API Result
Module name: Documents
Sample view: OPTIONS view
NOTE: There're 3 marker types at the end of lines:
- REMOVED: The field should be removed.
- ADDED: the field should be added. In each field's options object, some lines are marked with asterisks (*) which mean I'm not sure the correctness of the key-value. Please let me know if there're the point that's incorrect or better if we improve them.
- MODIFIED: the field has been edited from the current version in somewhat, please read more info at that line.
Module name: Documents
Sample view: OPTIONS view
NOTE: There're 3 marker types at the end of lines:
- REMOVED: The field should be removed.
- ADDED: the field should be added. In each field's options object, some lines are marked with asterisks (*) which mean I'm not sure the correctness of the key-value. Please let me know if there're the point that's incorrect or better if we improve them.
- MODIFIED: the field has been edited from the current version in somewhat, please read more info at that line.
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.