/fuel-pump-inventories-purchase-orders-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-003

  • HTTP method: PATCH

  • API path: /fuel-pump-inventories-purchase-orders-patch-one

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

  • Payload mode: json-body

Description

Function

jef-fuel-pump-inventories-patch-003 Logical ID: jef-fuel-pump-inventories:jef-fuel-pump-inventories-purchase-orders:patch-one Order Number: 003

Module

jef-fuel-pump-inventories

Action

patch-one

Method

PATCH

Invocation Mode

SYNCHRONOUS

Resource Path

/fuel-pump-inventories-purchase-orders-patch-one Endpoint Name: jef-fuel-pump-inventories-purchase-orders-patch-one

Table

jef-fuel-pump-inventories-purchase-orders

Primary Key

purchase_order_id

API Gateway Response

status\_code

Lambda proxy statusCode

message

Lambda response reflects commit success or failure.

Payload Example

purchase\_order\_id

e743809d-6561-4b58-94fc-8814a68c5293

gas\_station\_id

618fd84b-e771-4964-b274-b5672278bfbe

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-purchase-orders",
  "primary_key": "purchase_order_id",
  "required[0]": "purchase_order_id",
  "properties.purchase_order_id.field": "purchase_order_id",
  "properties.purchase_order_id.type": "S",
  "properties.purchase_order_id.required": "False",
  "properties.purchase_order_id.source_required": "True",
  "properties.purchase_order_id.server_generated": "True",
  "properties.purchase_order_id.autogenerated": "False",
  "properties.purchase_order_id.frontend_autocomputed": "False",
  "properties.purchase_order_id.format": "uuidv4",
  "properties.purchase_order_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.purchase_order_number.field": "purchase_order_number",
  "properties.purchase_order_number.type": "S",
  "properties.purchase_order_number.required": "True",
  "properties.purchase_order_number.source_required": "True",
  "properties.purchase_order_number.server_generated": "False",
  "properties.purchase_order_number.autogenerated": "False",
  "properties.purchase_order_number.frontend_autocomputed": "False",
  "properties.purchase_order_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.supplier_name.field": "supplier_name",
  "properties.supplier_name.type": "S",
  "properties.supplier_name.required": "True",
  "properties.supplier_name.source_required": "True",
  "properties.supplier_name.server_generated": "False",
  "properties.supplier_name.autogenerated": "False",
  "properties.supplier_name.frontend_autocomputed": "False",
  "properties.supplier_name.regex": "^[A-Za-z0-9 .,'_-]{1,120}$",
  "properties.delivery_reference_number.field": "delivery_reference_number",
  "properties.delivery_reference_number.type": "S",
  "properties.delivery_reference_number.required": "False",
  "properties.delivery_reference_number.source_required": "False",
  "properties.delivery_reference_number.server_generated": "False",
  "properties.delivery_reference_number.autogenerated": "False",
  "properties.delivery_reference_number.frontend_autocomputed": "False",
  "properties.delivery_reference_number.regex": "^[A-Za-z0-9_-]{1,64}$",
  "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+)?$",
  "children[0].parent_table": "jef-fuel-pump-inventories-purchase-orders",
  "children[0].child_table": "jef-fuel-pump-inventories-purchase-order-line-items",
  "children[0].parent_key": "purchase_order_id",
  "children[0].child_foreign_key": "purchase_order_id",
  "children[0].child_index_name": "gsi_1",
  "children[0].child_index_key": "gsi_1_pk",
  "children[0].aliases[0]": "jef-fuel-pump-inventories-purchase-order-line-items",
  "children[0].aliases[1]": "purchase-order-line-items",
  "children[0].aliases[2]": "fuel-pump-inventories-purchase-order-line-items",
  "children[0].aliases[3]": "jef_fuel_pump_inventories_purchase_order_line_items",
  "children[0].aliases[4]": "purchase_order_line_items",
  "children[0].aliases[5]": "fuel_pump_inventories_purchase_order_line_items",
  "children[0].aliases[6]": "items",
  "patch.semantic_patch_version": "patch-ignore-immutable-v2",
  "patch.allowed_fields[0]": "purchase_order_id",
  "patch.allowed_fields[1]": "gas_station_id",
  "patch.allowed_fields[2]": "purchase_order_number",
  "patch.allowed_fields[3]": "date",
  "patch.allowed_fields[4]": "supplier_name",
  "patch.allowed_fields[5]": "delivery_reference_number",
  "patch.allowed_fields[6]": "total_liters",
  "patch.allowed_fields[7]": "total_amount",
  "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.purchase_order_id.field": "purchase_order_id",
  "patch.editable_attributes.purchase_order_id.type": "S",
  "patch.editable_attributes.purchase_order_id.required": "False",
  "patch.editable_attributes.purchase_order_id.source_required": "True",
  "patch.editable_attributes.purchase_order_id.server_generated": "True",
  "patch.editable_attributes.purchase_order_id.autogenerated": "False",
  "patch.editable_attributes.purchase_order_id.frontend_autocomputed": "False",
  "patch.editable_attributes.purchase_order_id.format": "uuidv4",
  "patch.editable_attributes.purchase_order_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.purchase_order_number.field": "purchase_order_number",
  "patch.editable_attributes.purchase_order_number.type": "S",
  "patch.editable_attributes.purchase_order_number.required": "True",
  "patch.editable_attributes.purchase_order_number.source_required": "True",
  "patch.editable_attributes.purchase_order_number.server_generated": "False",
  "patch.editable_attributes.purchase_order_number.autogenerated": "False",
  "patch.editable_attributes.purchase_order_number.frontend_autocomputed": "False",
  "patch.editable_attributes.purchase_order_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.supplier_name.field": "supplier_name",
  "patch.editable_attributes.supplier_name.type": "S",
  "patch.editable_attributes.supplier_name.required": "True",
  "patch.editable_attributes.supplier_name.source_required": "True",
  "patch.editable_attributes.supplier_name.server_generated": "False",
  "patch.editable_attributes.supplier_name.autogenerated": "False",
  "patch.editable_attributes.supplier_name.frontend_autocomputed": "False",
  "patch.editable_attributes.supplier_name.regex": "^[A-Za-z0-9 .,'_-]{1,120}$",
  "patch.editable_attributes.delivery_reference_number.field": "delivery_reference_number",
  "patch.editable_attributes.delivery_reference_number.type": "S",
  "patch.editable_attributes.delivery_reference_number.required": "False",
  "patch.editable_attributes.delivery_reference_number.source_required": "False",
  "patch.editable_attributes.delivery_reference_number.server_generated": "False",
  "patch.editable_attributes.delivery_reference_number.autogenerated": "False",
  "patch.editable_attributes.delivery_reference_number.frontend_autocomputed": "False",
  "patch.editable_attributes.delivery_reference_number.regex": "^[A-Za-z0-9_-]{1,64}$",
  "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+)?$",
  "root.type": "object",
  "root.attributes.purchase_order_id.field": "purchase_order_id",
  "root.attributes.purchase_order_id.type": "S",
  "root.attributes.purchase_order_id.required": "False",
  "root.attributes.purchase_order_id.source_required": "True",
  "root.attributes.purchase_order_id.server_generated": "True",
  "root.attributes.purchase_order_id.autogenerated": "False",
  "root.attributes.purchase_order_id.frontend_autocomputed": "False",
  "root.attributes.purchase_order_id.format": "uuidv4",
  "root.attributes.purchase_order_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.purchase_order_number.field": "purchase_order_number",
  "root.attributes.purchase_order_number.type": "S",
  "root.attributes.purchase_order_number.required": "True",
  "root.attributes.purchase_order_number.source_required": "True",
  "root.attributes.purchase_order_number.server_generated": "False",
  "root.attributes.purchase_order_number.autogenerated": "False",
  "root.attributes.purchase_order_number.frontend_autocomputed": "False",
  "root.attributes.purchase_order_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.supplier_name.field": "supplier_name",
  "root.attributes.supplier_name.type": "S",
  "root.attributes.supplier_name.required": "True",
  "root.attributes.supplier_name.source_required": "True",
  "root.attributes.supplier_name.server_generated": "False",
  "root.attributes.supplier_name.autogenerated": "False",
  "root.attributes.supplier_name.frontend_autocomputed": "False",
  "root.attributes.supplier_name.regex": "^[A-Za-z0-9 .,'_-]{1,120}$",
  "root.attributes.delivery_reference_number.field": "delivery_reference_number",
  "root.attributes.delivery_reference_number.type": "S",
  "root.attributes.delivery_reference_number.required": "False",
  "root.attributes.delivery_reference_number.source_required": "False",
  "root.attributes.delivery_reference_number.server_generated": "False",
  "root.attributes.delivery_reference_number.autogenerated": "False",
  "root.attributes.delivery_reference_number.frontend_autocomputed": "False",
  "root.attributes.delivery_reference_number.regex": "^[A-Za-z0-9_-]{1,64}$",
  "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+)?$"
}

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

{
  "purchase_order_id": "e743809d-6561-4b58-94fc-8814a68c5293",
  "gas_station_id": "618fd84b-e771-4964-b274-b5672278bfbe"
}

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-purchase-orders-patch-one" -H "Content-Type: application/json" --data-raw "{\"purchase_order_id\": \"e743809d-6561-4b58-94fc-8814a68c5293\", \"gas_station_id\": \"618fd84b-e771-4964-b274-b5672278bfbe\"}"

PowerShell curl

curl.exe -X PATCH "https://fsqf5slhc1.execute-api.ap-southeast-1.amazonaws.com/prod/fuel-pump-inventories-purchase-orders-patch-one" -H "Content-Type: application/json" --data-raw '{"purchase_order_id": "e743809d-6561-4b58-94fc-8814a68c5293", "gas_station_id": "618fd84b-e771-4964-b274-b5672278bfbe"}'