/fuel-pump-inventories-sales-invoices-patch-one

Summary

  • Source repository: jef-systems/jef-fuel-pump-inventories-backend

  • Source SHA: 16fea06e1f47b95c448a4709d78bc3131c3fef3a

  • Source run id: 28367321603

  • Lambda function: jef-fuel-pump-inventories-patch-004

  • HTTP method: PATCH

  • API path: /fuel-pump-inventories-sales-invoices-patch-one

  • Endpoint URL: https://fsqf5slhc1.execute-api.ap-southeast-1.amazonaws.com/prod/fuel-pump-inventories-sales-invoices-patch-one

  • Payload mode: json-body

Description

Function

jef-fuel-pump-inventories-patch-004 Logical ID: jef-fuel-pump-inventories:jef-fuel-pump-inventories-sales-invoices:patch-one Order Number: 004

Module

jef-fuel-pump-inventories

Action

patch-one

Method

PATCH

Invocation Mode

SYNCHRONOUS

Resource Path

/fuel-pump-inventories-sales-invoices-patch-one Endpoint Name: jef-fuel-pump-inventories-sales-invoices-patch-one

Table

jef-fuel-pump-inventories-sales-invoices

Primary Key

sales_invoice_id

API Gateway Response

status\_code

Lambda proxy statusCode

message

Lambda response reflects commit success or failure.

Payload Example

sales\_invoice\_id

16f2b9d5-9289-4ebb-bbad-8622e668ce54

gas\_station\_id

a9aac959-9a69-4c6e-b125-e191dc6e5f9c

Payload Schema

{
  "type": "object",
  "additionalProperties": "False",
  "payload_mode": "parent-plus-children-wrapper",
  "allow_children_wrapper": "True",
  "children_wrapper_field": "children",
  "allow_batch": "False",
  "table": "jef-fuel-pump-inventories-sales-invoices",
  "primary_key": "sales_invoice_id",
  "required[0]": "sales_invoice_id",
  "properties.sales_invoice_id.field": "sales_invoice_id",
  "properties.sales_invoice_id.type": "S",
  "properties.sales_invoice_id.required": "False",
  "properties.sales_invoice_id.source_required": "True",
  "properties.sales_invoice_id.server_generated": "True",
  "properties.sales_invoice_id.autogenerated": "False",
  "properties.sales_invoice_id.frontend_autocomputed": "False",
  "properties.sales_invoice_id.format": "uuidv4",
  "properties.sales_invoice_id.regex": "^[1-9a-fA-F][0-9a-fA-F]{7}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
  "properties.gas_station_id.field": "gas_station_id",
  "properties.gas_station_id.type": "S",
  "properties.gas_station_id.required": "True",
  "properties.gas_station_id.source_required": "True",
  "properties.gas_station_id.server_generated": "True",
  "properties.gas_station_id.autogenerated": "False",
  "properties.gas_station_id.frontend_autocomputed": "False",
  "properties.gas_station_id.format": "uuidv4",
  "properties.gas_station_id.regex": "^[1-9a-fA-F][0-9a-fA-F]{7}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
  "properties.invoice_number.field": "invoice_number",
  "properties.invoice_number.type": "S",
  "properties.invoice_number.required": "True",
  "properties.invoice_number.source_required": "True",
  "properties.invoice_number.server_generated": "False",
  "properties.invoice_number.autogenerated": "False",
  "properties.invoice_number.frontend_autocomputed": "False",
  "properties.invoice_number.regex": "^[A-Za-z0-9_-]{1,64}$",
  "properties.date.field": "date",
  "properties.date.type": "S",
  "properties.date.required": "True",
  "properties.date.source_required": "True",
  "properties.date.server_generated": "False",
  "properties.date.autogenerated": "False",
  "properties.date.frontend_autocomputed": "False",
  "properties.date.regex": "^\\d{4}-\\d{2}-\\d{2}$",
  "properties.shift.field": "shift",
  "properties.shift.type": "S",
  "properties.shift.required": "True",
  "properties.shift.source_required": "True",
  "properties.shift.server_generated": "False",
  "properties.shift.autogenerated": "False",
  "properties.shift.frontend_autocomputed": "False",
  "properties.shift.regex": "^(morning|afternoon|night)$",
  "properties.customer_name.field": "customer_name",
  "properties.customer_name.type": "S",
  "properties.customer_name.required": "True",
  "properties.customer_name.source_required": "True",
  "properties.customer_name.server_generated": "False",
  "properties.customer_name.autogenerated": "False",
  "properties.customer_name.frontend_autocomputed": "False",
  "properties.customer_name.regex": "^[A-Za-z0-9 .,'_-]{1,120}$",
  "properties.plate_number.field": "plate_number",
  "properties.plate_number.type": "S",
  "properties.plate_number.required": "False",
  "properties.plate_number.source_required": "False",
  "properties.plate_number.server_generated": "False",
  "properties.plate_number.autogenerated": "False",
  "properties.plate_number.frontend_autocomputed": "False",
  "properties.plate_number.regex": "^[A-Za-z0-9 ._-]{1,30}$",
  "properties.payment_method.field": "payment_method",
  "properties.payment_method.type": "S",
  "properties.payment_method.required": "True",
  "properties.payment_method.source_required": "True",
  "properties.payment_method.server_generated": "False",
  "properties.payment_method.autogenerated": "False",
  "properties.payment_method.frontend_autocomputed": "False",
  "properties.payment_method.regex": "^(cash|gcash|maya|credit_card|debit_card|bank_transfer|check|fleet_card|other)$",
  "properties.total_liters.field": "total_liters",
  "properties.total_liters.type": "N",
  "properties.total_liters.required": "True",
  "properties.total_liters.source_required": "True",
  "properties.total_liters.server_generated": "False",
  "properties.total_liters.autogenerated": "False",
  "properties.total_liters.frontend_autocomputed": "False",
  "properties.total_liters.regex": "^-?\\d+(\\.\\d+)?$",
  "properties.total_amount.field": "total_amount",
  "properties.total_amount.type": "N",
  "properties.total_amount.required": "True",
  "properties.total_amount.source_required": "True",
  "properties.total_amount.server_generated": "False",
  "properties.total_amount.autogenerated": "False",
  "properties.total_amount.frontend_autocomputed": "False",
  "properties.total_amount.regex": "^-?\\d+(\\.\\d+)?$",
  "properties.notes.field": "notes",
  "properties.notes.type": "S",
  "properties.notes.required": "False",
  "properties.notes.source_required": "False",
  "properties.notes.server_generated": "False",
  "properties.notes.autogenerated": "False",
  "properties.notes.frontend_autocomputed": "False",
  "properties.notes.regex": "^.{0,500}$",
  "properties.status.field": "status",
  "properties.status.type": "S",
  "properties.status.required": "True",
  "properties.status.source_required": "True",
  "properties.status.server_generated": "False",
  "properties.status.autogenerated": "False",
  "properties.status.frontend_autocomputed": "False",
  "properties.status.regex": "^(draft|submitted|approved|cancelled)$",
  "children[0].parent_table": "jef-fuel-pump-inventories-sales-invoices",
  "children[0].child_table": "jef-fuel-pump-inventories-sales-invoice-line-items",
  "children[0].parent_key": "sales_invoice_id",
  "children[0].child_foreign_key": "sales_invoice_id",
  "children[0].child_index_name": "gsi_1",
  "children[0].child_index_key": "gsi_1_pk",
  "children[0].aliases[0]": "jef-fuel-pump-inventories-sales-invoice-line-items",
  "children[0].aliases[1]": "sales-invoice-line-items",
  "children[0].aliases[2]": "fuel-pump-inventories-sales-invoice-line-items",
  "children[0].aliases[3]": "jef_fuel_pump_inventories_sales_invoice_line_items",
  "children[0].aliases[4]": "sales_invoice_line_items",
  "children[0].aliases[5]": "fuel_pump_inventories_sales_invoice_line_items",
  "children[0].aliases[6]": "items",
  "patch.semantic_patch_version": "patch-ignore-immutable-v2",
  "patch.allowed_fields[0]": "sales_invoice_id",
  "patch.allowed_fields[1]": "gas_station_id",
  "patch.allowed_fields[2]": "invoice_number",
  "patch.allowed_fields[3]": "date",
  "patch.allowed_fields[4]": "shift",
  "patch.allowed_fields[5]": "customer_name",
  "patch.allowed_fields[6]": "plate_number",
  "patch.allowed_fields[7]": "payment_method",
  "patch.allowed_fields[8]": "total_liters",
  "patch.allowed_fields[9]": "total_amount",
  "patch.allowed_fields[10]": "notes",
  "patch.allowed_fields[11]": "status",
  "patch.ignored_fields[0]": "created",
  "patch.ignored_fields[1]": "created_at",
  "patch.ignored_fields[2]": "deleted_at",
  "patch.ignored_fields[3]": "idempotency_key",
  "patch.ignored_fields[4]": "is_deleted",
  "patch.ignored_fields[5]": "schema_version",
  "patch.ignored_fields[6]": "updated",
  "patch.ignored_fields[7]": "updated_at",
  "patch.editable_attributes.sales_invoice_id.field": "sales_invoice_id",
  "patch.editable_attributes.sales_invoice_id.type": "S",
  "patch.editable_attributes.sales_invoice_id.required": "False",
  "patch.editable_attributes.sales_invoice_id.source_required": "True",
  "patch.editable_attributes.sales_invoice_id.server_generated": "True",
  "patch.editable_attributes.sales_invoice_id.autogenerated": "False",
  "patch.editable_attributes.sales_invoice_id.frontend_autocomputed": "False",
  "patch.editable_attributes.sales_invoice_id.format": "uuidv4",
  "patch.editable_attributes.sales_invoice_id.regex": "^[1-9a-fA-F][0-9a-fA-F]{7}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
  "patch.editable_attributes.gas_station_id.field": "gas_station_id",
  "patch.editable_attributes.gas_station_id.type": "S",
  "patch.editable_attributes.gas_station_id.required": "True",
  "patch.editable_attributes.gas_station_id.source_required": "True",
  "patch.editable_attributes.gas_station_id.server_generated": "True",
  "patch.editable_attributes.gas_station_id.autogenerated": "False",
  "patch.editable_attributes.gas_station_id.frontend_autocomputed": "False",
  "patch.editable_attributes.gas_station_id.format": "uuidv4",
  "patch.editable_attributes.gas_station_id.regex": "^[1-9a-fA-F][0-9a-fA-F]{7}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
  "patch.editable_attributes.invoice_number.field": "invoice_number",
  "patch.editable_attributes.invoice_number.type": "S",
  "patch.editable_attributes.invoice_number.required": "True",
  "patch.editable_attributes.invoice_number.source_required": "True",
  "patch.editable_attributes.invoice_number.server_generated": "False",
  "patch.editable_attributes.invoice_number.autogenerated": "False",
  "patch.editable_attributes.invoice_number.frontend_autocomputed": "False",
  "patch.editable_attributes.invoice_number.regex": "^[A-Za-z0-9_-]{1,64}$",
  "patch.editable_attributes.date.field": "date",
  "patch.editable_attributes.date.type": "S",
  "patch.editable_attributes.date.required": "True",
  "patch.editable_attributes.date.source_required": "True",
  "patch.editable_attributes.date.server_generated": "False",
  "patch.editable_attributes.date.autogenerated": "False",
  "patch.editable_attributes.date.frontend_autocomputed": "False",
  "patch.editable_attributes.date.regex": "^\\d{4}-\\d{2}-\\d{2}$",
  "patch.editable_attributes.shift.field": "shift",
  "patch.editable_attributes.shift.type": "S",
  "patch.editable_attributes.shift.required": "True",
  "patch.editable_attributes.shift.source_required": "True",
  "patch.editable_attributes.shift.server_generated": "False",
  "patch.editable_attributes.shift.autogenerated": "False",
  "patch.editable_attributes.shift.frontend_autocomputed": "False",
  "patch.editable_attributes.shift.regex": "^(morning|afternoon|night)$",
  "patch.editable_attributes.customer_name.field": "customer_name",
  "patch.editable_attributes.customer_name.type": "S",
  "patch.editable_attributes.customer_name.required": "True",
  "patch.editable_attributes.customer_name.source_required": "True",
  "patch.editable_attributes.customer_name.server_generated": "False",
  "patch.editable_attributes.customer_name.autogenerated": "False",
  "patch.editable_attributes.customer_name.frontend_autocomputed": "False",
  "patch.editable_attributes.customer_name.regex": "^[A-Za-z0-9 .,'_-]{1,120}$",
  "patch.editable_attributes.plate_number.field": "plate_number",
  "patch.editable_attributes.plate_number.type": "S",
  "patch.editable_attributes.plate_number.required": "False",
  "patch.editable_attributes.plate_number.source_required": "False",
  "patch.editable_attributes.plate_number.server_generated": "False",
  "patch.editable_attributes.plate_number.autogenerated": "False",
  "patch.editable_attributes.plate_number.frontend_autocomputed": "False",
  "patch.editable_attributes.plate_number.regex": "^[A-Za-z0-9 ._-]{1,30}$",
  "patch.editable_attributes.payment_method.field": "payment_method",
  "patch.editable_attributes.payment_method.type": "S",
  "patch.editable_attributes.payment_method.required": "True",
  "patch.editable_attributes.payment_method.source_required": "True",
  "patch.editable_attributes.payment_method.server_generated": "False",
  "patch.editable_attributes.payment_method.autogenerated": "False",
  "patch.editable_attributes.payment_method.frontend_autocomputed": "False",
  "patch.editable_attributes.payment_method.regex": "^(cash|gcash|maya|credit_card|debit_card|bank_transfer|check|fleet_card|other)$",
  "patch.editable_attributes.total_liters.field": "total_liters",
  "patch.editable_attributes.total_liters.type": "N",
  "patch.editable_attributes.total_liters.required": "True",
  "patch.editable_attributes.total_liters.source_required": "True",
  "patch.editable_attributes.total_liters.server_generated": "False",
  "patch.editable_attributes.total_liters.autogenerated": "False",
  "patch.editable_attributes.total_liters.frontend_autocomputed": "False",
  "patch.editable_attributes.total_liters.regex": "^-?\\d+(\\.\\d+)?$",
  "patch.editable_attributes.total_amount.field": "total_amount",
  "patch.editable_attributes.total_amount.type": "N",
  "patch.editable_attributes.total_amount.required": "True",
  "patch.editable_attributes.total_amount.source_required": "True",
  "patch.editable_attributes.total_amount.server_generated": "False",
  "patch.editable_attributes.total_amount.autogenerated": "False",
  "patch.editable_attributes.total_amount.frontend_autocomputed": "False",
  "patch.editable_attributes.total_amount.regex": "^-?\\d+(\\.\\d+)?$",
  "patch.editable_attributes.notes.field": "notes",
  "patch.editable_attributes.notes.type": "S",
  "patch.editable_attributes.notes.required": "False",
  "patch.editable_attributes.notes.source_required": "False",
  "patch.editable_attributes.notes.server_generated": "False",
  "patch.editable_attributes.notes.autogenerated": "False",
  "patch.editable_attributes.notes.frontend_autocomputed": "False",
  "patch.editable_attributes.notes.regex": "^.{0,500}$",
  "patch.editable_attributes.status.field": "status",
  "patch.editable_attributes.status.type": "S",
  "patch.editable_attributes.status.required": "True",
  "patch.editable_attributes.status.source_required": "True",
  "patch.editable_attributes.status.server_generated": "False",
  "patch.editable_attributes.status.autogenerated": "False",
  "patch.editable_attributes.status.frontend_autocomputed": "False",
  "patch.editable_attributes.status.regex": "^(draft|submitted|approved|cancelled)$",
  "root.type": "object",
  "root.attributes.sales_invoice_id.field": "sales_invoice_id",
  "root.attributes.sales_invoice_id.type": "S",
  "root.attributes.sales_invoice_id.required": "False",
  "root.attributes.sales_invoice_id.source_required": "True",
  "root.attributes.sales_invoice_id.server_generated": "True",
  "root.attributes.sales_invoice_id.autogenerated": "False",
  "root.attributes.sales_invoice_id.frontend_autocomputed": "False",
  "root.attributes.sales_invoice_id.format": "uuidv4",
  "root.attributes.sales_invoice_id.regex": "^[1-9a-fA-F][0-9a-fA-F]{7}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
  "root.attributes.gas_station_id.field": "gas_station_id",
  "root.attributes.gas_station_id.type": "S",
  "root.attributes.gas_station_id.required": "True",
  "root.attributes.gas_station_id.source_required": "True",
  "root.attributes.gas_station_id.server_generated": "True",
  "root.attributes.gas_station_id.autogenerated": "False",
  "root.attributes.gas_station_id.frontend_autocomputed": "False",
  "root.attributes.gas_station_id.format": "uuidv4",
  "root.attributes.gas_station_id.regex": "^[1-9a-fA-F][0-9a-fA-F]{7}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
  "root.attributes.invoice_number.field": "invoice_number",
  "root.attributes.invoice_number.type": "S",
  "root.attributes.invoice_number.required": "True",
  "root.attributes.invoice_number.source_required": "True",
  "root.attributes.invoice_number.server_generated": "False",
  "root.attributes.invoice_number.autogenerated": "False",
  "root.attributes.invoice_number.frontend_autocomputed": "False",
  "root.attributes.invoice_number.regex": "^[A-Za-z0-9_-]{1,64}$",
  "root.attributes.date.field": "date",
  "root.attributes.date.type": "S",
  "root.attributes.date.required": "True",
  "root.attributes.date.source_required": "True",
  "root.attributes.date.server_generated": "False",
  "root.attributes.date.autogenerated": "False",
  "root.attributes.date.frontend_autocomputed": "False",
  "root.attributes.date.regex": "^\\d{4}-\\d{2}-\\d{2}$",
  "root.attributes.shift.field": "shift",
  "root.attributes.shift.type": "S",
  "root.attributes.shift.required": "True",
  "root.attributes.shift.source_required": "True",
  "root.attributes.shift.server_generated": "False",
  "root.attributes.shift.autogenerated": "False",
  "root.attributes.shift.frontend_autocomputed": "False",
  "root.attributes.shift.regex": "^(morning|afternoon|night)$",
  "root.attributes.customer_name.field": "customer_name",
  "root.attributes.customer_name.type": "S",
  "root.attributes.customer_name.required": "True",
  "root.attributes.customer_name.source_required": "True",
  "root.attributes.customer_name.server_generated": "False",
  "root.attributes.customer_name.autogenerated": "False",
  "root.attributes.customer_name.frontend_autocomputed": "False",
  "root.attributes.customer_name.regex": "^[A-Za-z0-9 .,'_-]{1,120}$",
  "root.attributes.plate_number.field": "plate_number",
  "root.attributes.plate_number.type": "S",
  "root.attributes.plate_number.required": "False",
  "root.attributes.plate_number.source_required": "False",
  "root.attributes.plate_number.server_generated": "False",
  "root.attributes.plate_number.autogenerated": "False",
  "root.attributes.plate_number.frontend_autocomputed": "False",
  "root.attributes.plate_number.regex": "^[A-Za-z0-9 ._-]{1,30}$",
  "root.attributes.payment_method.field": "payment_method",
  "root.attributes.payment_method.type": "S",
  "root.attributes.payment_method.required": "True",
  "root.attributes.payment_method.source_required": "True",
  "root.attributes.payment_method.server_generated": "False",
  "root.attributes.payment_method.autogenerated": "False",
  "root.attributes.payment_method.frontend_autocomputed": "False",
  "root.attributes.payment_method.regex": "^(cash|gcash|maya|credit_card|debit_card|bank_transfer|check|fleet_card|other)$",
  "root.attributes.total_liters.field": "total_liters",
  "root.attributes.total_liters.type": "N",
  "root.attributes.total_liters.required": "True",
  "root.attributes.total_liters.source_required": "True",
  "root.attributes.total_liters.server_generated": "False",
  "root.attributes.total_liters.autogenerated": "False",
  "root.attributes.total_liters.frontend_autocomputed": "False",
  "root.attributes.total_liters.regex": "^-?\\d+(\\.\\d+)?$",
  "root.attributes.total_amount.field": "total_amount",
  "root.attributes.total_amount.type": "N",
  "root.attributes.total_amount.required": "True",
  "root.attributes.total_amount.source_required": "True",
  "root.attributes.total_amount.server_generated": "False",
  "root.attributes.total_amount.autogenerated": "False",
  "root.attributes.total_amount.frontend_autocomputed": "False",
  "root.attributes.total_amount.regex": "^-?\\d+(\\.\\d+)?$",
  "root.attributes.notes.field": "notes",
  "root.attributes.notes.type": "S",
  "root.attributes.notes.required": "False",
  "root.attributes.notes.source_required": "False",
  "root.attributes.notes.server_generated": "False",
  "root.attributes.notes.autogenerated": "False",
  "root.attributes.notes.frontend_autocomputed": "False",
  "root.attributes.notes.regex": "^.{0,500}$",
  "root.attributes.status.field": "status",
  "root.attributes.status.type": "S",
  "root.attributes.status.required": "True",
  "root.attributes.status.source_required": "True",
  "root.attributes.status.server_generated": "False",
  "root.attributes.status.autogenerated": "False",
  "root.attributes.status.frontend_autocomputed": "False",
  "root.attributes.status.regex": "^(draft|submitted|approved|cancelled)$"
}

Response Schema

{
  "type": "object",
  "properties.ok.type": "boolean",
  "properties.accepted.type": "boolean",
  "properties.is_committed.type": "boolean",
  "properties.request_id.type": "string",
  "properties.message.type": "string",
  "properties.table.type": "string",
  "properties.operation.type": "string",
  "properties.primary_key.type": "string",
  "properties.primary_key_value.type": "string",
  "properties.item_update_count.type": "number",
  "properties.child_update_count.type": "number"
}

Request Payload

{
  "sales_invoice_id": "16f2b9d5-9289-4ebb-bbad-8622e668ce54",
  "gas_station_id": "a9aac959-9a69-4c6e-b125-e191dc6e5f9c"
}

Response

{
  "type": "object",
  "properties.ok.type": "boolean",
  "properties.accepted.type": "boolean",
  "properties.is_committed.type": "boolean",
  "properties.request_id.type": "string",
  "properties.message.type": "string",
  "properties.table.type": "string",
  "properties.operation.type": "string",
  "properties.primary_key.type": "string",
  "properties.primary_key_value.type": "string",
  "properties.item_update_count.type": "number",
  "properties.child_update_count.type": "number"
}

CMD curl

curl -X PATCH "https://fsqf5slhc1.execute-api.ap-southeast-1.amazonaws.com/prod/fuel-pump-inventories-sales-invoices-patch-one" -H "Content-Type: application/json" --data-raw "{\"sales_invoice_id\": \"16f2b9d5-9289-4ebb-bbad-8622e668ce54\", \"gas_station_id\": \"a9aac959-9a69-4c6e-b125-e191dc6e5f9c\"}"

PowerShell curl

curl.exe -X PATCH "https://fsqf5slhc1.execute-api.ap-southeast-1.amazonaws.com/prod/fuel-pump-inventories-sales-invoices-patch-one" -H "Content-Type: application/json" --data-raw '{"sales_invoice_id": "16f2b9d5-9289-4ebb-bbad-8622e668ce54", "gas_station_id": "a9aac959-9a69-4c6e-b125-e191dc6e5f9c"}'