/fuel-pump-inventories-purchase-orders-post-one

Summary

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

  • Source SHA: 0345cd6480c0cb10fcd6bf1b5df3d407a0059226

  • Source run id: 25995204672

  • Lambda function: jef-fuel-pump-inventories-purchase-orders-post-one

  • HTTP method: POST

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

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

  • Payload mode: json-body

Description

  • Function: jef-fuel-pump-inventories-purchase-orders-post-one

  • Module: jef-fuel-pump-inventories

  • Action: post-one

  • Method: POST

  • Invocation Mode: ASYNC

  • Resource Path: /fuel-pump-inventories-purchase-orders-post-one

  • Table: jef-fuel-pump-inventories-purchase-orders

  • Primary Key: purchase_order_id

API Gateway Response

  • status\_code: 202

  • message: Request accepted for asynchronous processing.

Payload Example

  • purchase\_order\_id: f6d0673e-3c28-4bd1-b23a-6539145c26f9

  • gas\_station\_id: bca67f9d-d33a-4b86-9129-908895584666

  • purchase\_order\_number: value-001

  • date: 2026-05-17

  • supplier\_name: Island Fuel Supply

  • delivery\_reference\_number: value-001

  • total\_liters: 1

  • total\_amount: 1

  • notes: Sample text 001

  • status: completed

  • created\_at: 2026-05-17T15:26:21Z

  • updated\_at: 2026-05-17T15:26:21Z

  • 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: value_00

  • children.purchase\_order\_line\_items\[0\].product: Diesel

  • 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\].delivery\_reference\_number: value-001

  • children.purchase\_order\_line\_items\[0\].notes: Verified during daily reconciliation

  • children.purchase\_order\_line\_items\[0\].status: value_00

  • children.purchase\_order\_line\_items\[0\].created\_at: 2026-05-17T15:26:21Z

  • children.purchase\_order\_line\_items\[0\].updated\_at: 2026-05-17T15:26:21Z

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": "True",
  "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.type": "S",
  "root.attributes.purchase_order_number.required": "True",
  "root.attributes.purchase_order_number.regex": "^[A-Za-z0-9_-]{1,64}$",
  "root.attributes.date.type": "S",
  "root.attributes.date.required": "True",
  "root.attributes.date.regex": "^\\d{4}-\\d{2}-\\d{2}$",
  "root.attributes.supplier_name.type": "S",
  "root.attributes.supplier_name.required": "True",
  "root.attributes.supplier_name.regex": "^[A-Za-z0-9 .,'_-]{1,120}$",
  "root.attributes.delivery_reference_number.type": "S",
  "root.attributes.delivery_reference_number.required": "False",
  "root.attributes.delivery_reference_number.regex": "^[A-Za-z0-9_-]{1,64}$",
  "root.attributes.total_liters.type": "N",
  "root.attributes.total_liters.required": "True",
  "root.attributes.total_liters.regex": "^-?\\d+(\\.\\d+)?$",
  "root.attributes.total_amount.type": "N",
  "root.attributes.total_amount.required": "True",
  "root.attributes.total_amount.regex": "^-?\\d+(\\.\\d+)?$",
  "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": "True",
  "root.attributes.status.regex": "^[A-Za-z0-9_-]{1,50}$",
  "root.attributes.created_at.type": "S",
  "root.attributes.created_at.required": "True",
  "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": "True",
  "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": "True",
  "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": "True",
  "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.type": "S",
  "root.attributes.children.attributes.purchase_order_line_items.items.attributes.pump.required": "False",
  "root.attributes.children.attributes.purchase_order_line_items.items.attributes.pump.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": "True",
  "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": "True",
  "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": "True",
  "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": "True",
  "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.delivery_reference_number.type": "S",
  "root.attributes.children.attributes.purchase_order_line_items.items.attributes.delivery_reference_number.required": "False",
  "root.attributes.children.attributes.purchase_order_line_items.items.attributes.delivery_reference_number.regex": "^[A-Za-z0-9_-]{1,64}$",
  "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": "True",
  "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": "True",
  "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": "True",
  "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",
  "purchase_order_number": "value-001",
  "date": "2026-05-17",
  "supplier_name": "Island Fuel Supply",
  "delivery_reference_number": "value-001",
  "total_liters": "1",
  "total_amount": "1",
  "notes": "Sample text 001",
  "status": "completed",
  "created_at": "2026-05-17T15:26:21Z",
  "updated_at": "2026-05-17T15:26:21Z",
  "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": "value_00",
  "children.purchase_order_line_items[0].product": "Diesel",
  "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].delivery_reference_number": "value-001",
  "children.purchase_order_line_items[0].notes": "Verified during daily reconciliation",
  "children.purchase_order_line_items[0].status": "value_00",
  "children.purchase_order_line_items[0].created_at": "2026-05-17T15:26:21Z",
  "children.purchase_order_line_items[0].updated_at": "2026-05-17T15:26:21Z"
}

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 POST "https://zgmzv02c7f.execute-api.ap-southeast-1.amazonaws.com/prod/fuel-pump-inventories-purchase-orders-post-one" -H "Content-Type: application/json" --data-raw "{\"purchase_order_id\": \"f6d0673e-3c28-4bd1-b23a-6539145c26f9\", \"gas_station_id\": \"bca67f9d-d33a-4b86-9129-908895584666\", \"purchase_order_number\": \"value-001\", \"date\": \"2026-05-17\", \"supplier_name\": \"Island Fuel Supply\", \"delivery_reference_number\": \"value-001\", \"total_liters\": 1, \"total_amount\": 1, \"notes\": \"Sample text 001\", \"status\": \"completed\", \"created_at\": \"2026-05-17T15:26:21Z\", \"updated_at\": \"2026-05-17T15:26:21Z\", \"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\": \"value_00\", \"product\": \"Diesel\", \"liters\": 1, \"price_per_liter\": 1, \"total_amount\": 1, \"delivery_reference_number\": \"value-001\", \"notes\": \"Verified during daily reconciliation\", \"status\": \"value_00\", \"created_at\": \"2026-05-17T15:26:21Z\", \"updated_at\": \"2026-05-17T15:26:21Z\"}]}}"

PowerShell curl

curl.exe -X POST "https://zgmzv02c7f.execute-api.ap-southeast-1.amazonaws.com/prod/fuel-pump-inventories-purchase-orders-post-one" -H "Content-Type: application/json" --data-raw '{"purchase_order_id": "f6d0673e-3c28-4bd1-b23a-6539145c26f9", "gas_station_id": "bca67f9d-d33a-4b86-9129-908895584666", "purchase_order_number": "value-001", "date": "2026-05-17", "supplier_name": "Island Fuel Supply", "delivery_reference_number": "value-001", "total_liters": 1, "total_amount": 1, "notes": "Sample text 001", "status": "completed", "created_at": "2026-05-17T15:26:21Z", "updated_at": "2026-05-17T15:26:21Z", "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": "value_00", "product": "Diesel", "liters": 1, "price_per_liter": 1, "total_amount": 1, "delivery_reference_number": "value-001", "notes": "Verified during daily reconciliation", "status": "value_00", "created_at": "2026-05-17T15:26:21Z", "updated_at": "2026-05-17T15:26:21Z"}]}}'