/hardware-rentals-patch-one¶
Summary¶
Source repository:
jef-systems/jef-hardware-backendSource SHA:
890931f40c2c41e18d31c3a0f2d179223722cecaSource run id:
26363092644Lambda function:
jef-hardware-rentals-patch-oneHTTP method:
PATCHAPI path:
/hardware-rentals-patch-oneEndpoint URL:
https://5g667fp458.execute-api.ap-southeast-1.amazonaws.com/prod/hardware-rentals-patch-onePayload mode:
json-body
Description¶
Function: jef-hardware-rentals-patch-oneModule: jef-hardwareAction: patch-oneMethod: PATCHInvocation Mode: ASYNCResource Path: /hardware-rentals-patch-oneTable: jef-hardware-rentalsPrimary Key: rental_id
API Gateway Response¶
status\_code: 202message: Request accepted for asynchronous processing.
Payload Example¶
rental\_id: 7543eb36-edad-46bd-84ae-0268f57a07fbstore\_id: f80b79c4-749b-4b6f-a851-d53715181f63order\_number: value-001cashier\_name: Maria Reyesterminal\_name: value-001customer\_id: 15abe94d-fa56-4642-8193-4351c8033a00customer\_name: Ramon Santoscustomer\_mobile\_number: value-001customer\_address: Sample text 001customer\_government\_id\_type: value-001customer\_government\_id\_number: value-001deposit: 1gross\_total: 1total\_due: 1expected\_return\_at: 2026-05-24T13:46:22Zrental\_status: value-001print\_status: value-001printed\_at: 2026-05-24T13:46:22Zprinter\_device\_id: value-001printer\_device\_name: value_00deleted\_at: 2026-05-24T13:46:22Zchildren.rental\_items\[0\].rental\_item\_id: f3477708-fa98-4f51-8e33-27f77d35dfe2children.rental\_items\[0\].rental\_id: 7543eb36-edad-46bd-84ae-0268f57a07fbchildren.rental\_items\[0\].store\_id: f80b79c4-749b-4b6f-a851-d53715181f63children.rental\_items\[0\].toolbox\_id: ccb00721-6479-4c14-be47-c021b95aa31achildren.rental\_items\[0\].line\_number: 1children.rental\_items\[0\].equipment\_name: Electric Drillchildren.rental\_items\[0\].category: value-001children.rental\_items\[0\].included\_items\_text: Sample text 001children.rental\_items\[0\].rate\_per\_day: 1children.rental\_items\[0\].days: 1children.rental\_items\[0\].subtotal: 1children.rental\_items\[0\].qr\_value: value-001children.rental\_items\[0\].expected\_return\_at: 2026-05-24T13:46:22Zchildren.rental\_items\[0\].rental\_item\_status: activechildren.rental\_items\[0\].deleted\_at: 2026-05-24T13:46:22Z
Payload Schema¶
{
"root.type": "M",
"root.required": "True",
"root.attributes.rental_id.type": "S",
"root.attributes.rental_id.required": "True",
"root.attributes.rental_id.format": "uuidv4",
"root.attributes.rental_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.store_id.type": "S",
"root.attributes.store_id.required": "False",
"root.attributes.store_id.format": "uuidv4",
"root.attributes.store_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.order_number.type": "S",
"root.attributes.order_number.required": "False",
"root.attributes.order_number.regex": "^[A-Za-z0-9_-]{1,64}$",
"root.attributes.cashier_name.type": "S",
"root.attributes.cashier_name.required": "False",
"root.attributes.cashier_name.regex": "^[A-Za-z0-9 .,'_-]{1,120}$",
"root.attributes.terminal_name.type": "S",
"root.attributes.terminal_name.required": "False",
"root.attributes.terminal_name.regex": "^[A-Za-z0-9_-]{1,64}$",
"root.attributes.customer_id.type": "S",
"root.attributes.customer_id.required": "False",
"root.attributes.customer_id.format": "uuidv4",
"root.attributes.customer_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.customer_name.type": "S",
"root.attributes.customer_name.required": "False",
"root.attributes.customer_name.regex": "^[A-Za-z0-9 .,'_-]{1,120}$",
"root.attributes.customer_mobile_number.type": "S",
"root.attributes.customer_mobile_number.required": "False",
"root.attributes.customer_mobile_number.regex": "^[A-Za-z0-9_-]{1,64}$",
"root.attributes.customer_address.type": "S",
"root.attributes.customer_address.required": "False",
"root.attributes.customer_address.regex": "^.{1,300}$",
"root.attributes.customer_government_id_type.type": "S",
"root.attributes.customer_government_id_type.required": "False",
"root.attributes.customer_government_id_type.regex": "^[A-Za-z0-9_-]{1,64}$",
"root.attributes.customer_government_id_number.type": "S",
"root.attributes.customer_government_id_number.required": "False",
"root.attributes.customer_government_id_number.regex": "^[A-Za-z0-9_-]{1,64}$",
"root.attributes.deposit.type": "N",
"root.attributes.deposit.required": "False",
"root.attributes.deposit.regex": "^-?\\d+(\\.\\d+)?$",
"root.attributes.gross_total.type": "N",
"root.attributes.gross_total.required": "False",
"root.attributes.gross_total.regex": "^-?\\d+(\\.\\d+)?$",
"root.attributes.total_due.type": "N",
"root.attributes.total_due.required": "False",
"root.attributes.total_due.regex": "^-?\\d+(\\.\\d+)?$",
"root.attributes.expected_return_at.type": "S",
"root.attributes.expected_return_at.required": "False",
"root.attributes.expected_return_at.format": "iso8601",
"root.attributes.expected_return_at.regex": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?Z?$",
"root.attributes.rental_status.type": "S",
"root.attributes.rental_status.required": "False",
"root.attributes.rental_status.regex": "^[A-Za-z0-9_-]{1,64}$",
"root.attributes.print_status.type": "S",
"root.attributes.print_status.required": "False",
"root.attributes.print_status.regex": "^[A-Za-z0-9_-]{1,64}$",
"root.attributes.printed_at.type": "S",
"root.attributes.printed_at.required": "False",
"root.attributes.printed_at.format": "iso8601",
"root.attributes.printed_at.regex": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?Z?$",
"root.attributes.printer_device_id.type": "S",
"root.attributes.printer_device_id.required": "False",
"root.attributes.printer_device_id.regex": "^[A-Za-z0-9_-]{1,64}$",
"root.attributes.printer_device_name.type": "S",
"root.attributes.printer_device_name.required": "False",
"root.attributes.printer_device_name.regex": "^[A-Za-z0-9 .,'_-]{1,120}$",
"root.attributes.deleted_at.type": "S",
"root.attributes.deleted_at.required": "False",
"root.attributes.deleted_at.format": "iso8601",
"root.attributes.deleted_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.rental_items.type": "L",
"root.attributes.children.attributes.rental_items.required": "False",
"root.attributes.children.attributes.rental_items.items.type": "M",
"root.attributes.children.attributes.rental_items.items.attributes.rental_item_id.type": "S",
"root.attributes.children.attributes.rental_items.items.attributes.rental_item_id.required": "True",
"root.attributes.children.attributes.rental_items.items.attributes.rental_item_id.format": "uuidv4",
"root.attributes.children.attributes.rental_items.items.attributes.rental_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.rental_items.items.attributes.rental_id.type": "S",
"root.attributes.children.attributes.rental_items.items.attributes.rental_id.required": "False",
"root.attributes.children.attributes.rental_items.items.attributes.rental_id.format": "uuidv4",
"root.attributes.children.attributes.rental_items.items.attributes.rental_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.rental_items.items.attributes.store_id.type": "S",
"root.attributes.children.attributes.rental_items.items.attributes.store_id.required": "False",
"root.attributes.children.attributes.rental_items.items.attributes.store_id.format": "uuidv4",
"root.attributes.children.attributes.rental_items.items.attributes.store_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.rental_items.items.attributes.toolbox_id.type": "S",
"root.attributes.children.attributes.rental_items.items.attributes.toolbox_id.required": "False",
"root.attributes.children.attributes.rental_items.items.attributes.toolbox_id.format": "uuidv4",
"root.attributes.children.attributes.rental_items.items.attributes.toolbox_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.rental_items.items.attributes.line_number.type": "N",
"root.attributes.children.attributes.rental_items.items.attributes.line_number.required": "False",
"root.attributes.children.attributes.rental_items.items.attributes.line_number.regex": "^\\d+$",
"root.attributes.children.attributes.rental_items.items.attributes.equipment_name.type": "S",
"root.attributes.children.attributes.rental_items.items.attributes.equipment_name.required": "False",
"root.attributes.children.attributes.rental_items.items.attributes.equipment_name.regex": "^[A-Za-z0-9 .,'_-]{1,120}$",
"root.attributes.children.attributes.rental_items.items.attributes.category.type": "S",
"root.attributes.children.attributes.rental_items.items.attributes.category.required": "False",
"root.attributes.children.attributes.rental_items.items.attributes.category.regex": "^[A-Za-z0-9_-]{1,64}$",
"root.attributes.children.attributes.rental_items.items.attributes.included_items_text.type": "S",
"root.attributes.children.attributes.rental_items.items.attributes.included_items_text.required": "False",
"root.attributes.children.attributes.rental_items.items.attributes.included_items_text.regex": "^.{0,500}$",
"root.attributes.children.attributes.rental_items.items.attributes.rate_per_day.type": "N",
"root.attributes.children.attributes.rental_items.items.attributes.rate_per_day.required": "False",
"root.attributes.children.attributes.rental_items.items.attributes.rate_per_day.regex": "^-?\\d+(\\.\\d+)?$",
"root.attributes.children.attributes.rental_items.items.attributes.days.type": "N",
"root.attributes.children.attributes.rental_items.items.attributes.days.required": "False",
"root.attributes.children.attributes.rental_items.items.attributes.days.regex": "^\\d+$",
"root.attributes.children.attributes.rental_items.items.attributes.subtotal.type": "N",
"root.attributes.children.attributes.rental_items.items.attributes.subtotal.required": "False",
"root.attributes.children.attributes.rental_items.items.attributes.subtotal.regex": "^-?\\d+(\\.\\d+)?$",
"root.attributes.children.attributes.rental_items.items.attributes.qr_value.type": "S",
"root.attributes.children.attributes.rental_items.items.attributes.qr_value.required": "False",
"root.attributes.children.attributes.rental_items.items.attributes.qr_value.regex": "^[A-Za-z0-9_-]{1,64}$",
"root.attributes.children.attributes.rental_items.items.attributes.expected_return_at.type": "S",
"root.attributes.children.attributes.rental_items.items.attributes.expected_return_at.required": "False",
"root.attributes.children.attributes.rental_items.items.attributes.expected_return_at.format": "iso8601",
"root.attributes.children.attributes.rental_items.items.attributes.expected_return_at.regex": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?Z?$",
"root.attributes.children.attributes.rental_items.items.attributes.rental_item_status.type": "S",
"root.attributes.children.attributes.rental_items.items.attributes.rental_item_status.required": "False",
"root.attributes.children.attributes.rental_items.items.attributes.rental_item_status.regex": "^[A-Za-z0-9_-]{1,64}$",
"root.attributes.children.attributes.rental_items.items.attributes.deleted_at.type": "S",
"root.attributes.children.attributes.rental_items.items.attributes.deleted_at.required": "False",
"root.attributes.children.attributes.rental_items.items.attributes.deleted_at.format": "iso8601",
"root.attributes.children.attributes.rental_items.items.attributes.deleted_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¶
{
"rental_id": "7543eb36-edad-46bd-84ae-0268f57a07fb",
"store_id": "f80b79c4-749b-4b6f-a851-d53715181f63",
"order_number": "value-001",
"cashier_name": "Maria Reyes",
"terminal_name": "value-001",
"customer_id": "15abe94d-fa56-4642-8193-4351c8033a00",
"customer_name": "Ramon Santos",
"customer_mobile_number": "value-001",
"customer_address": "Sample text 001",
"customer_government_id_type": "value-001",
"customer_government_id_number": "value-001",
"deposit": "1",
"gross_total": "1",
"total_due": "1",
"expected_return_at": "2026-05-24T13:46:22Z",
"rental_status": "value-001",
"print_status": "value-001",
"printed_at": "2026-05-24T13:46:22Z",
"printer_device_id": "value-001",
"printer_device_name": "value_00",
"deleted_at": "2026-05-24T13:46:22Z",
"children.rental_items[0].rental_item_id": "f3477708-fa98-4f51-8e33-27f77d35dfe2",
"children.rental_items[0].rental_id": "7543eb36-edad-46bd-84ae-0268f57a07fb",
"children.rental_items[0].store_id": "f80b79c4-749b-4b6f-a851-d53715181f63",
"children.rental_items[0].toolbox_id": "ccb00721-6479-4c14-be47-c021b95aa31a",
"children.rental_items[0].line_number": "1",
"children.rental_items[0].equipment_name": "Electric Drill",
"children.rental_items[0].category": "value-001",
"children.rental_items[0].included_items_text": "Sample text 001",
"children.rental_items[0].rate_per_day": "1",
"children.rental_items[0].days": "1",
"children.rental_items[0].subtotal": "1",
"children.rental_items[0].qr_value": "value-001",
"children.rental_items[0].expected_return_at": "2026-05-24T13:46:22Z",
"children.rental_items[0].rental_item_status": "active",
"children.rental_items[0].deleted_at": "2026-05-24T13:46:22Z"
}
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://5g667fp458.execute-api.ap-southeast-1.amazonaws.com/prod/hardware-rentals-patch-one" -H "Content-Type: application/json" --data-raw "{\"rental_id\": \"7543eb36-edad-46bd-84ae-0268f57a07fb\", \"store_id\": \"f80b79c4-749b-4b6f-a851-d53715181f63\", \"order_number\": \"value-001\", \"cashier_name\": \"Maria Reyes\", \"terminal_name\": \"value-001\", \"customer_id\": \"15abe94d-fa56-4642-8193-4351c8033a00\", \"customer_name\": \"Ramon Santos\", \"customer_mobile_number\": \"value-001\", \"customer_address\": \"Sample text 001\", \"customer_government_id_type\": \"value-001\", \"customer_government_id_number\": \"value-001\", \"deposit\": 1, \"gross_total\": 1, \"total_due\": 1, \"expected_return_at\": \"2026-05-24T13:46:22Z\", \"rental_status\": \"value-001\", \"print_status\": \"value-001\", \"printed_at\": \"2026-05-24T13:46:22Z\", \"printer_device_id\": \"value-001\", \"printer_device_name\": \"value_00\", \"deleted_at\": \"2026-05-24T13:46:22Z\", \"children\": {\"rental_items\": [{\"rental_item_id\": \"f3477708-fa98-4f51-8e33-27f77d35dfe2\", \"rental_id\": \"7543eb36-edad-46bd-84ae-0268f57a07fb\", \"store_id\": \"f80b79c4-749b-4b6f-a851-d53715181f63\", \"toolbox_id\": \"ccb00721-6479-4c14-be47-c021b95aa31a\", \"line_number\": 1, \"equipment_name\": \"Electric Drill\", \"category\": \"value-001\", \"included_items_text\": \"Sample text 001\", \"rate_per_day\": 1, \"days\": 1, \"subtotal\": 1, \"qr_value\": \"value-001\", \"expected_return_at\": \"2026-05-24T13:46:22Z\", \"rental_item_status\": \"active\", \"deleted_at\": \"2026-05-24T13:46:22Z\"}]}}"
PowerShell curl¶
curl.exe -X PATCH "https://5g667fp458.execute-api.ap-southeast-1.amazonaws.com/prod/hardware-rentals-patch-one" -H "Content-Type: application/json" --data-raw '{"rental_id": "7543eb36-edad-46bd-84ae-0268f57a07fb", "store_id": "f80b79c4-749b-4b6f-a851-d53715181f63", "order_number": "value-001", "cashier_name": "Maria Reyes", "terminal_name": "value-001", "customer_id": "15abe94d-fa56-4642-8193-4351c8033a00", "customer_name": "Ramon Santos", "customer_mobile_number": "value-001", "customer_address": "Sample text 001", "customer_government_id_type": "value-001", "customer_government_id_number": "value-001", "deposit": 1, "gross_total": 1, "total_due": 1, "expected_return_at": "2026-05-24T13:46:22Z", "rental_status": "value-001", "print_status": "value-001", "printed_at": "2026-05-24T13:46:22Z", "printer_device_id": "value-001", "printer_device_name": "value_00", "deleted_at": "2026-05-24T13:46:22Z", "children": {"rental_items": [{"rental_item_id": "f3477708-fa98-4f51-8e33-27f77d35dfe2", "rental_id": "7543eb36-edad-46bd-84ae-0268f57a07fb", "store_id": "f80b79c4-749b-4b6f-a851-d53715181f63", "toolbox_id": "ccb00721-6479-4c14-be47-c021b95aa31a", "line_number": 1, "equipment_name": "Electric Drill", "category": "value-001", "included_items_text": "Sample text 001", "rate_per_day": 1, "days": 1, "subtotal": 1, "qr_value": "value-001", "expected_return_at": "2026-05-24T13:46:22Z", "rental_item_status": "active", "deleted_at": "2026-05-24T13:46:22Z"}]}}'