/fuel-pump-inventories-purchase-orders-patch-one¶
Summary¶
Source repository:
jef-systems/jef-fuel-pump-inventories-backendSource SHA:
06a517c1413d99627ecd462c7e29779b2dfd2412Source run id:
25888946091Lambda function:
jef-fuel-pump-inventories-purchase-orders-patch-oneHTTP method:
PATCHAPI path:
/fuel-pump-inventories-purchase-orders-patch-oneEndpoint URL:
https://zgmzv02c7f.execute-api.ap-southeast-1.amazonaws.com/prod/fuel-pump-inventories-purchase-orders-patch-onePayload mode:
json-body
Description¶
Function: jef-fuel-pump-inventories-purchase-orders-patch-oneModule: jef-fuel-pump-inventoriesAction: patch-oneMethod: PATCHInvocation Mode: ASYNCResource Path: /fuel-pump-inventories-purchase-orders-patch-oneTable: jef-fuel-pump-inventories-purchase-ordersPrimary Key: purchase_order_id
API Gateway Response¶
status\_code: 202message: Request accepted for asynchronous processing.
Payload Example¶
purchase\_order\_id: f6d0673e-3c28-4bd1-b23a-6539145c26f9gas\_station\_id: bca67f9d-d33a-4b86-9129-908895584666receipt\_number: value_001date: 2026-05-15shift: Value 001pump\_id: 1b57c133-526c-4a19-871d-883455fe5027pump\_label: Value 001product: Value 001liters: 1price\_per\_liter: 1total\_amount: 1customer\_name: Value 001plate\_number: Value 001driver\_name: Value 001notes: Value 001status: value_001created\_at: 2026-05-14T22:13:56Zupdated\_at: 2026-05-14T22:13:56Zchildren.purchase\_order\_line\_items\[0\].purchase\_order\_line\_item\_id: 249586ae-92c2-43c3-ab87-9cad2db4c4f0children.purchase\_order\_line\_items\[0\].purchase\_order\_id: f6d0673e-3c28-4bd1-b23a-6539145c26f9children.purchase\_order\_line\_items\[0\].gas\_station\_id: bca67f9d-d33a-4b86-9129-908895584666children.purchase\_order\_line\_items\[0\].line\_number: 1children.purchase\_order\_line\_items\[0\].pump\_id: 1b57c133-526c-4a19-871d-883455fe5027children.purchase\_order\_line\_items\[0\].pump\_label: Value 001children.purchase\_order\_line\_items\[0\].product: Value 001children.purchase\_order\_line\_items\[0\].liters: 1children.purchase\_order\_line\_items\[0\].price\_per\_liter: 1children.purchase\_order\_line\_items\[0\].total\_amount: 1children.purchase\_order\_line\_items\[0\].plate\_number: Value 001children.purchase\_order\_line\_items\[0\].driver\_name: Value 001children.purchase\_order\_line\_items\[0\].notes: Value 001children.purchase\_order\_line\_items\[0\].status: value_001children.purchase\_order\_line\_items\[0\].created\_at: 2026-05-14T22:13:56Zchildren.purchase\_order\_line\_items\[0\].updated\_at: 2026-05-14T22:13:56Z
Payload Schema¶
{
"root.type": "M",
"root.required": "True",
"root.attributes.purchase_order_id.type": "S",
"root.attributes.purchase_order_id.required": "True",
"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.type": "S",
"root.attributes.gas_station_id.required": "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.receipt_number.type": "S",
"root.attributes.receipt_number.required": "False",
"root.attributes.receipt_number.regex": "^[A-Za-z0-9_-]{1,64}$",
"root.attributes.date.type": "S",
"root.attributes.date.required": "False",
"root.attributes.date.regex": "^\\d{4}-\\d{2}-\\d{2}$",
"root.attributes.shift.type": "S",
"root.attributes.shift.required": "False",
"root.attributes.shift.regex": "^[A-Za-z0-9 ._-]{1,50}$",
"root.attributes.pump_id.type": "S",
"root.attributes.pump_id.required": "False",
"root.attributes.pump_id.format": "uuidv4",
"root.attributes.pump_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.pump_label.type": "S",
"root.attributes.pump_label.required": "False",
"root.attributes.pump_label.regex": "^[A-Za-z0-9 ._-]{1,80}$",
"root.attributes.product.type": "S",
"root.attributes.product.required": "False",
"root.attributes.product.regex": "^[A-Za-z0-9 ._-]{1,80}$",
"root.attributes.liters.type": "N",
"root.attributes.liters.required": "False",
"root.attributes.liters.regex": "^-?\\d+(\\.\\d+)?$",
"root.attributes.price_per_liter.type": "N",
"root.attributes.price_per_liter.required": "False",
"root.attributes.price_per_liter.regex": "^-?\\d+(\\.\\d+)?$",
"root.attributes.total_amount.type": "N",
"root.attributes.total_amount.required": "False",
"root.attributes.total_amount.regex": "^-?\\d+(\\.\\d+)?$",
"root.attributes.customer_name.type": "S",
"root.attributes.customer_name.required": "False",
"root.attributes.customer_name.regex": "^[A-Za-z0-9 .,'_-]{1,120}$",
"root.attributes.plate_number.type": "S",
"root.attributes.plate_number.required": "False",
"root.attributes.plate_number.regex": "^[A-Za-z0-9 ._-]{1,30}$",
"root.attributes.driver_name.type": "S",
"root.attributes.driver_name.required": "False",
"root.attributes.driver_name.regex": "^[A-Za-z0-9 .,'_-]{1,120}$",
"root.attributes.notes.type": "S",
"root.attributes.notes.required": "False",
"root.attributes.notes.regex": "^.{0,500}$",
"root.attributes.status.type": "S",
"root.attributes.status.required": "False",
"root.attributes.status.regex": "^[A-Za-z0-9_-]{1,50}$",
"root.attributes.created_at.type": "S",
"root.attributes.created_at.required": "False",
"root.attributes.created_at.format": "iso8601",
"root.attributes.created_at.regex": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?Z?$",
"root.attributes.updated_at.type": "S",
"root.attributes.updated_at.required": "False",
"root.attributes.updated_at.format": "iso8601",
"root.attributes.updated_at.regex": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?Z?$",
"root.attributes.children.type": "M",
"root.attributes.children.required": "False",
"root.attributes.children.attributes.purchase_order_line_items.type": "L",
"root.attributes.children.attributes.purchase_order_line_items.required": "False",
"root.attributes.children.attributes.purchase_order_line_items.items.type": "M",
"root.attributes.children.attributes.purchase_order_line_items.items.attributes.purchase_order_line_item_id.type": "S",
"root.attributes.children.attributes.purchase_order_line_items.items.attributes.purchase_order_line_item_id.required": "True",
"root.attributes.children.attributes.purchase_order_line_items.items.attributes.purchase_order_line_item_id.format": "uuidv4",
"root.attributes.children.attributes.purchase_order_line_items.items.attributes.purchase_order_line_item_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.children.attributes.purchase_order_line_items.items.attributes.purchase_order_id.type": "S",
"root.attributes.children.attributes.purchase_order_line_items.items.attributes.purchase_order_id.required": "False",
"root.attributes.children.attributes.purchase_order_line_items.items.attributes.purchase_order_id.format": "uuidv4",
"root.attributes.children.attributes.purchase_order_line_items.items.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.children.attributes.purchase_order_line_items.items.attributes.gas_station_id.type": "S",
"root.attributes.children.attributes.purchase_order_line_items.items.attributes.gas_station_id.required": "False",
"root.attributes.children.attributes.purchase_order_line_items.items.attributes.gas_station_id.format": "uuidv4",
"root.attributes.children.attributes.purchase_order_line_items.items.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.children.attributes.purchase_order_line_items.items.attributes.line_number.type": "N",
"root.attributes.children.attributes.purchase_order_line_items.items.attributes.line_number.required": "False",
"root.attributes.children.attributes.purchase_order_line_items.items.attributes.line_number.regex": "^\\d+$",
"root.attributes.children.attributes.purchase_order_line_items.items.attributes.pump_id.type": "S",
"root.attributes.children.attributes.purchase_order_line_items.items.attributes.pump_id.required": "False",
"root.attributes.children.attributes.purchase_order_line_items.items.attributes.pump_id.format": "uuidv4",
"root.attributes.children.attributes.purchase_order_line_items.items.attributes.pump_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.children.attributes.purchase_order_line_items.items.attributes.pump_label.type": "S",
"root.attributes.children.attributes.purchase_order_line_items.items.attributes.pump_label.required": "False",
"root.attributes.children.attributes.purchase_order_line_items.items.attributes.pump_label.regex": "^[A-Za-z0-9 ._-]{1,80}$",
"root.attributes.children.attributes.purchase_order_line_items.items.attributes.product.type": "S",
"root.attributes.children.attributes.purchase_order_line_items.items.attributes.product.required": "False",
"root.attributes.children.attributes.purchase_order_line_items.items.attributes.product.regex": "^[A-Za-z0-9 ._-]{1,80}$",
"root.attributes.children.attributes.purchase_order_line_items.items.attributes.liters.type": "N",
"root.attributes.children.attributes.purchase_order_line_items.items.attributes.liters.required": "False",
"root.attributes.children.attributes.purchase_order_line_items.items.attributes.liters.regex": "^-?\\d+(\\.\\d+)?$",
"root.attributes.children.attributes.purchase_order_line_items.items.attributes.price_per_liter.type": "N",
"root.attributes.children.attributes.purchase_order_line_items.items.attributes.price_per_liter.required": "False",
"root.attributes.children.attributes.purchase_order_line_items.items.attributes.price_per_liter.regex": "^-?\\d+(\\.\\d+)?$",
"root.attributes.children.attributes.purchase_order_line_items.items.attributes.total_amount.type": "N",
"root.attributes.children.attributes.purchase_order_line_items.items.attributes.total_amount.required": "False",
"root.attributes.children.attributes.purchase_order_line_items.items.attributes.total_amount.regex": "^-?\\d+(\\.\\d+)?$",
"root.attributes.children.attributes.purchase_order_line_items.items.attributes.plate_number.type": "S",
"root.attributes.children.attributes.purchase_order_line_items.items.attributes.plate_number.required": "False",
"root.attributes.children.attributes.purchase_order_line_items.items.attributes.plate_number.regex": "^[A-Za-z0-9 ._-]{1,30}$",
"root.attributes.children.attributes.purchase_order_line_items.items.attributes.driver_name.type": "S",
"root.attributes.children.attributes.purchase_order_line_items.items.attributes.driver_name.required": "False",
"root.attributes.children.attributes.purchase_order_line_items.items.attributes.driver_name.regex": "^[A-Za-z0-9 .,'_-]{1,120}$",
"root.attributes.children.attributes.purchase_order_line_items.items.attributes.notes.type": "S",
"root.attributes.children.attributes.purchase_order_line_items.items.attributes.notes.required": "False",
"root.attributes.children.attributes.purchase_order_line_items.items.attributes.notes.regex": "^.{0,500}$",
"root.attributes.children.attributes.purchase_order_line_items.items.attributes.status.type": "S",
"root.attributes.children.attributes.purchase_order_line_items.items.attributes.status.required": "False",
"root.attributes.children.attributes.purchase_order_line_items.items.attributes.status.regex": "^[A-Za-z0-9_-]{1,50}$",
"root.attributes.children.attributes.purchase_order_line_items.items.attributes.created_at.type": "S",
"root.attributes.children.attributes.purchase_order_line_items.items.attributes.created_at.required": "False",
"root.attributes.children.attributes.purchase_order_line_items.items.attributes.created_at.format": "iso8601",
"root.attributes.children.attributes.purchase_order_line_items.items.attributes.created_at.regex": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?Z?$",
"root.attributes.children.attributes.purchase_order_line_items.items.attributes.updated_at.type": "S",
"root.attributes.children.attributes.purchase_order_line_items.items.attributes.updated_at.required": "False",
"root.attributes.children.attributes.purchase_order_line_items.items.attributes.updated_at.format": "iso8601",
"root.attributes.children.attributes.purchase_order_line_items.items.attributes.updated_at.regex": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?Z?$"
}
Response Schema¶
{
"root.type": "M",
"root.required": "True",
"root.attributes.is_accepted.type": "BOOL",
"root.attributes.is_accepted.required": "True",
"root.attributes.message.type": "S",
"root.attributes.message.required": "True",
"root.attributes.request_id.type": "S",
"root.attributes.request_id.required": "False"
}
Request Payload¶
{
"purchase_order_id": "f6d0673e-3c28-4bd1-b23a-6539145c26f9",
"gas_station_id": "bca67f9d-d33a-4b86-9129-908895584666",
"receipt_number": "value_001",
"date": "2026-05-15",
"shift": "Value 001",
"pump_id": "1b57c133-526c-4a19-871d-883455fe5027",
"pump_label": "Value 001",
"product": "Value 001",
"liters": "1",
"price_per_liter": "1",
"total_amount": "1",
"customer_name": "Value 001",
"plate_number": "Value 001",
"driver_name": "Value 001",
"notes": "Value 001",
"status": "value_001",
"created_at": "2026-05-14T22:13:56Z",
"updated_at": "2026-05-14T22:13:56Z",
"children.purchase_order_line_items[0].purchase_order_line_item_id": "249586ae-92c2-43c3-ab87-9cad2db4c4f0",
"children.purchase_order_line_items[0].purchase_order_id": "f6d0673e-3c28-4bd1-b23a-6539145c26f9",
"children.purchase_order_line_items[0].gas_station_id": "bca67f9d-d33a-4b86-9129-908895584666",
"children.purchase_order_line_items[0].line_number": "1",
"children.purchase_order_line_items[0].pump_id": "1b57c133-526c-4a19-871d-883455fe5027",
"children.purchase_order_line_items[0].pump_label": "Value 001",
"children.purchase_order_line_items[0].product": "Value 001",
"children.purchase_order_line_items[0].liters": "1",
"children.purchase_order_line_items[0].price_per_liter": "1",
"children.purchase_order_line_items[0].total_amount": "1",
"children.purchase_order_line_items[0].plate_number": "Value 001",
"children.purchase_order_line_items[0].driver_name": "Value 001",
"children.purchase_order_line_items[0].notes": "Value 001",
"children.purchase_order_line_items[0].status": "value_001",
"children.purchase_order_line_items[0].created_at": "2026-05-14T22:13:56Z",
"children.purchase_order_line_items[0].updated_at": "2026-05-14T22:13:56Z"
}
Response¶
{
"root.type": "M",
"root.required": "True",
"root.attributes.is_accepted.type": "BOOL",
"root.attributes.is_accepted.required": "True",
"root.attributes.message.type": "S",
"root.attributes.message.required": "True",
"root.attributes.request_id.type": "S",
"root.attributes.request_id.required": "False"
}
CMD curl¶
curl -X PATCH "https://zgmzv02c7f.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\": \"f6d0673e-3c28-4bd1-b23a-6539145c26f9\", \"gas_station_id\": \"bca67f9d-d33a-4b86-9129-908895584666\", \"receipt_number\": \"value_001\", \"date\": \"2026-05-15\", \"shift\": \"Value 001\", \"pump_id\": \"1b57c133-526c-4a19-871d-883455fe5027\", \"pump_label\": \"Value 001\", \"product\": \"Value 001\", \"liters\": 1, \"price_per_liter\": 1, \"total_amount\": 1, \"customer_name\": \"Value 001\", \"plate_number\": \"Value 001\", \"driver_name\": \"Value 001\", \"notes\": \"Value 001\", \"status\": \"value_001\", \"created_at\": \"2026-05-14T22:13:56Z\", \"updated_at\": \"2026-05-14T22:13:56Z\", \"children\": {\"purchase_order_line_items\": [{\"purchase_order_line_item_id\": \"249586ae-92c2-43c3-ab87-9cad2db4c4f0\", \"purchase_order_id\": \"f6d0673e-3c28-4bd1-b23a-6539145c26f9\", \"gas_station_id\": \"bca67f9d-d33a-4b86-9129-908895584666\", \"line_number\": 1, \"pump_id\": \"1b57c133-526c-4a19-871d-883455fe5027\", \"pump_label\": \"Value 001\", \"product\": \"Value 001\", \"liters\": 1, \"price_per_liter\": 1, \"total_amount\": 1, \"plate_number\": \"Value 001\", \"driver_name\": \"Value 001\", \"notes\": \"Value 001\", \"status\": \"value_001\", \"created_at\": \"2026-05-14T22:13:56Z\", \"updated_at\": \"2026-05-14T22:13:56Z\"}]}}"
PowerShell curl¶
curl.exe -X PATCH "https://zgmzv02c7f.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": "f6d0673e-3c28-4bd1-b23a-6539145c26f9", "gas_station_id": "bca67f9d-d33a-4b86-9129-908895584666", "receipt_number": "value_001", "date": "2026-05-15", "shift": "Value 001", "pump_id": "1b57c133-526c-4a19-871d-883455fe5027", "pump_label": "Value 001", "product": "Value 001", "liters": 1, "price_per_liter": 1, "total_amount": 1, "customer_name": "Value 001", "plate_number": "Value 001", "driver_name": "Value 001", "notes": "Value 001", "status": "value_001", "created_at": "2026-05-14T22:13:56Z", "updated_at": "2026-05-14T22:13:56Z", "children": {"purchase_order_line_items": [{"purchase_order_line_item_id": "249586ae-92c2-43c3-ab87-9cad2db4c4f0", "purchase_order_id": "f6d0673e-3c28-4bd1-b23a-6539145c26f9", "gas_station_id": "bca67f9d-d33a-4b86-9129-908895584666", "line_number": 1, "pump_id": "1b57c133-526c-4a19-871d-883455fe5027", "pump_label": "Value 001", "product": "Value 001", "liters": 1, "price_per_liter": 1, "total_amount": 1, "plate_number": "Value 001", "driver_name": "Value 001", "notes": "Value 001", "status": "value_001", "created_at": "2026-05-14T22:13:56Z", "updated_at": "2026-05-14T22:13:56Z"}]}}'