/fuel-pump-inventories-gas-stations-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-001

  • HTTP method: PATCH

  • API path: /fuel-pump-inventories-gas-stations-patch-one

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

  • Payload mode: json-body

Description

Function

jef-fuel-pump-inventories-patch-001 Logical ID: jef-fuel-pump-inventories:jef-fuel-pump-inventories-gas-stations:patch-one Order Number: 001

Module

jef-fuel-pump-inventories

Action

patch-one

Method

PATCH

Invocation Mode

SYNCHRONOUS

Resource Path

/fuel-pump-inventories-gas-stations-patch-one Endpoint Name: jef-fuel-pump-inventories-gas-stations-patch-one

Table

jef-fuel-pump-inventories-gas-stations

Primary Key

gas_station_id

API Gateway Response

status\_code

Lambda proxy statusCode

message

Lambda response reflects commit success or failure.

Payload Example

gas\_station\_id

d6fff3e8-f4bf-404e-8400-c9d87916e249

station\_code

value-001

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-gas-stations",
  "primary_key": "gas_station_id",
  "required[0]": "gas_station_id",
  "properties.gas_station_id.field": "gas_station_id",
  "properties.gas_station_id.type": "S",
  "properties.gas_station_id.required": "False",
  "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.station_code.field": "station_code",
  "properties.station_code.type": "S",
  "properties.station_code.required": "True",
  "properties.station_code.source_required": "True",
  "properties.station_code.server_generated": "False",
  "properties.station_code.autogenerated": "False",
  "properties.station_code.frontend_autocomputed": "False",
  "properties.station_code.regex": "^[A-Za-z0-9_-]{1,64}$",
  "properties.station_name.field": "station_name",
  "properties.station_name.type": "S",
  "properties.station_name.required": "True",
  "properties.station_name.source_required": "True",
  "properties.station_name.server_generated": "False",
  "properties.station_name.autogenerated": "False",
  "properties.station_name.frontend_autocomputed": "False",
  "properties.station_name.regex": "^[A-Za-z0-9 ._-]{1,100}$",
  "properties.address.field": "address",
  "properties.address.type": "S",
  "properties.address.required": "True",
  "properties.address.source_required": "True",
  "properties.address.server_generated": "False",
  "properties.address.autogenerated": "False",
  "properties.address.frontend_autocomputed": "False",
  "properties.address.regex": "^.{1,300}$",
  "properties.contact_number.field": "contact_number",
  "properties.contact_number.type": "S",
  "properties.contact_number.required": "False",
  "properties.contact_number.source_required": "False",
  "properties.contact_number.server_generated": "False",
  "properties.contact_number.autogenerated": "False",
  "properties.contact_number.frontend_autocomputed": "False",
  "properties.contact_number.regex": "^$|^[0-9+() .-]{7,30}$",
  "properties.is_active.field": "is_active",
  "properties.is_active.type": "BOOL",
  "properties.is_active.required": "False",
  "properties.is_active.source_required": "True",
  "properties.is_active.server_generated": "True",
  "properties.is_active.autogenerated": "False",
  "properties.is_active.frontend_autocomputed": "False",
  "properties.is_active.regex": "^(true|false)$",
  "children[0].parent_table": "jef-fuel-pump-inventories-gas-stations",
  "children[0].child_table": "jef-fuel-pump-inventories-pumps",
  "children[0].parent_key": "gas_station_id",
  "children[0].child_foreign_key": "gas_station_id",
  "children[0].child_index_name": "gsi_1",
  "children[0].child_index_key": "gsi_1_pk",
  "children[0].aliases[0]": "jef-fuel-pump-inventories-pumps",
  "children[0].aliases[1]": "pumps",
  "children[0].aliases[2]": "fuel-pump-inventories-pumps",
  "children[0].aliases[3]": "jef_fuel_pump_inventories_pumps",
  "children[0].aliases[4]": "fuel_pump_inventories_pumps",
  "children[1].parent_table": "jef-fuel-pump-inventories-gas-stations",
  "children[1].child_table": "jef-fuel-pump-inventories-purchase-orders",
  "children[1].parent_key": "gas_station_id",
  "children[1].child_foreign_key": "gas_station_id",
  "children[1].child_index_name": "gsi_1",
  "children[1].child_index_key": "gsi_1_pk",
  "children[1].aliases[0]": "jef-fuel-pump-inventories-purchase-orders",
  "children[1].aliases[1]": "purchase-orders",
  "children[1].aliases[2]": "fuel-pump-inventories-purchase-orders",
  "children[1].aliases[3]": "jef_fuel_pump_inventories_purchase_orders",
  "children[1].aliases[4]": "purchase_orders",
  "children[1].aliases[5]": "fuel_pump_inventories_purchase_orders",
  "children[1].aliases[6]": "orders",
  "children[2].parent_table": "jef-fuel-pump-inventories-gas-stations",
  "children[2].child_table": "jef-fuel-pump-inventories-sales-invoices",
  "children[2].parent_key": "gas_station_id",
  "children[2].child_foreign_key": "gas_station_id",
  "children[2].child_index_name": "gsi_1",
  "children[2].child_index_key": "gsi_1_pk",
  "children[2].aliases[0]": "jef-fuel-pump-inventories-sales-invoices",
  "children[2].aliases[1]": "sales-invoices",
  "children[2].aliases[2]": "fuel-pump-inventories-sales-invoices",
  "children[2].aliases[3]": "jef_fuel_pump_inventories_sales_invoices",
  "children[2].aliases[4]": "sales_invoices",
  "children[2].aliases[5]": "fuel_pump_inventories_sales_invoices",
  "children[2].aliases[6]": "invoices",
  "patch.semantic_patch_version": "patch-ignore-immutable-v2",
  "patch.allowed_fields[0]": "gas_station_id",
  "patch.allowed_fields[1]": "station_code",
  "patch.allowed_fields[2]": "station_name",
  "patch.allowed_fields[3]": "address",
  "patch.allowed_fields[4]": "contact_number",
  "patch.allowed_fields[5]": "is_active",
  "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.gas_station_id.field": "gas_station_id",
  "patch.editable_attributes.gas_station_id.type": "S",
  "patch.editable_attributes.gas_station_id.required": "False",
  "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.station_code.field": "station_code",
  "patch.editable_attributes.station_code.type": "S",
  "patch.editable_attributes.station_code.required": "True",
  "patch.editable_attributes.station_code.source_required": "True",
  "patch.editable_attributes.station_code.server_generated": "False",
  "patch.editable_attributes.station_code.autogenerated": "False",
  "patch.editable_attributes.station_code.frontend_autocomputed": "False",
  "patch.editable_attributes.station_code.regex": "^[A-Za-z0-9_-]{1,64}$",
  "patch.editable_attributes.station_name.field": "station_name",
  "patch.editable_attributes.station_name.type": "S",
  "patch.editable_attributes.station_name.required": "True",
  "patch.editable_attributes.station_name.source_required": "True",
  "patch.editable_attributes.station_name.server_generated": "False",
  "patch.editable_attributes.station_name.autogenerated": "False",
  "patch.editable_attributes.station_name.frontend_autocomputed": "False",
  "patch.editable_attributes.station_name.regex": "^[A-Za-z0-9 ._-]{1,100}$",
  "patch.editable_attributes.address.field": "address",
  "patch.editable_attributes.address.type": "S",
  "patch.editable_attributes.address.required": "True",
  "patch.editable_attributes.address.source_required": "True",
  "patch.editable_attributes.address.server_generated": "False",
  "patch.editable_attributes.address.autogenerated": "False",
  "patch.editable_attributes.address.frontend_autocomputed": "False",
  "patch.editable_attributes.address.regex": "^.{1,300}$",
  "patch.editable_attributes.contact_number.field": "contact_number",
  "patch.editable_attributes.contact_number.type": "S",
  "patch.editable_attributes.contact_number.required": "False",
  "patch.editable_attributes.contact_number.source_required": "False",
  "patch.editable_attributes.contact_number.server_generated": "False",
  "patch.editable_attributes.contact_number.autogenerated": "False",
  "patch.editable_attributes.contact_number.frontend_autocomputed": "False",
  "patch.editable_attributes.contact_number.regex": "^$|^[0-9+() .-]{7,30}$",
  "patch.editable_attributes.is_active.field": "is_active",
  "patch.editable_attributes.is_active.type": "BOOL",
  "patch.editable_attributes.is_active.required": "False",
  "patch.editable_attributes.is_active.source_required": "True",
  "patch.editable_attributes.is_active.server_generated": "True",
  "patch.editable_attributes.is_active.autogenerated": "False",
  "patch.editable_attributes.is_active.frontend_autocomputed": "False",
  "patch.editable_attributes.is_active.regex": "^(true|false)$",
  "root.type": "object",
  "root.attributes.gas_station_id.field": "gas_station_id",
  "root.attributes.gas_station_id.type": "S",
  "root.attributes.gas_station_id.required": "False",
  "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.station_code.field": "station_code",
  "root.attributes.station_code.type": "S",
  "root.attributes.station_code.required": "True",
  "root.attributes.station_code.source_required": "True",
  "root.attributes.station_code.server_generated": "False",
  "root.attributes.station_code.autogenerated": "False",
  "root.attributes.station_code.frontend_autocomputed": "False",
  "root.attributes.station_code.regex": "^[A-Za-z0-9_-]{1,64}$",
  "root.attributes.station_name.field": "station_name",
  "root.attributes.station_name.type": "S",
  "root.attributes.station_name.required": "True",
  "root.attributes.station_name.source_required": "True",
  "root.attributes.station_name.server_generated": "False",
  "root.attributes.station_name.autogenerated": "False",
  "root.attributes.station_name.frontend_autocomputed": "False",
  "root.attributes.station_name.regex": "^[A-Za-z0-9 ._-]{1,100}$",
  "root.attributes.address.field": "address",
  "root.attributes.address.type": "S",
  "root.attributes.address.required": "True",
  "root.attributes.address.source_required": "True",
  "root.attributes.address.server_generated": "False",
  "root.attributes.address.autogenerated": "False",
  "root.attributes.address.frontend_autocomputed": "False",
  "root.attributes.address.regex": "^.{1,300}$",
  "root.attributes.contact_number.field": "contact_number",
  "root.attributes.contact_number.type": "S",
  "root.attributes.contact_number.required": "False",
  "root.attributes.contact_number.source_required": "False",
  "root.attributes.contact_number.server_generated": "False",
  "root.attributes.contact_number.autogenerated": "False",
  "root.attributes.contact_number.frontend_autocomputed": "False",
  "root.attributes.contact_number.regex": "^$|^[0-9+() .-]{7,30}$",
  "root.attributes.is_active.field": "is_active",
  "root.attributes.is_active.type": "BOOL",
  "root.attributes.is_active.required": "False",
  "root.attributes.is_active.source_required": "True",
  "root.attributes.is_active.server_generated": "True",
  "root.attributes.is_active.autogenerated": "False",
  "root.attributes.is_active.frontend_autocomputed": "False",
  "root.attributes.is_active.regex": "^(true|false)$"
}

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

{
  "gas_station_id": "d6fff3e8-f4bf-404e-8400-c9d87916e249",
  "station_code": "value-001"
}

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-gas-stations-patch-one" -H "Content-Type: application/json" --data-raw "{\"gas_station_id\": \"d6fff3e8-f4bf-404e-8400-c9d87916e249\", \"station_code\": \"value-001\"}"

PowerShell curl

curl.exe -X PATCH "https://fsqf5slhc1.execute-api.ap-southeast-1.amazonaws.com/prod/fuel-pump-inventories-gas-stations-patch-one" -H "Content-Type: application/json" --data-raw '{"gas_station_id": "d6fff3e8-f4bf-404e-8400-c9d87916e249", "station_code": "value-001"}'