/hardware-rentals-patch-one¶
Summary¶
Source repository:
jef-systems/jef-hardware-backendSource SHA:
05b6b8706f6c3ea7eabd1a8e2be37d0117a97d9fSource run id:
26738299239Lambda 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: 17694391-d710-43b5-b9d8-7c0f9951a27cstore\_id: a759206d-4ca5-4adb-b7fe-b1d0b8506b0corder\_number: 0001cashier\_name: Sample Hardware Rentals 001terminal\_name: value-001customer\_id: 603fea88-5ea3-4e79-8c42-8fefe0b083cbcustomer\_name: Sample Hardware Rentals 001customer\_mobile\_number: 0001customer\_address: value-001customer\_government\_id\_type: companycustomer\_government\_id\_number: 0001deposit: 1gross\_total: 1total\_due: 1expected\_return\_at: 2026-06-01T06:02:55Zrental\_status: value-001print\_status: value-001printed\_at: 2026-06-01T06:02:55Zprinter\_device\_id: ee043b88-fa2d-432e-92da-c9c3b9071686printer\_device\_name: Sample Hardware Rentals 001created: 2026-06-01T06:02:55Zupdated: 2026-06-01T06:02:55Zdeleted\_at: 2026-06-01T06:02:55Zchildren.rental\_items\[0\].rental\_item\_id: 3f1eadf5-47e9-4b25-ad3a-673ad151f2c7children.rental\_items\[0\].rental\_id: 17694391-d710-43b5-b9d8-7c0f9951a27cchildren.rental\_items\[0\].store\_id: a759206d-4ca5-4adb-b7fe-b1d0b8506b0cchildren.rental\_items\[0\].toolbox\_id: 6f0368ab-6e1c-4a73-98ef-a72547aa1598children.rental\_items\[0\].line\_number: 1children.rental\_items\[0\].equipment\_name: Sample Hardware Rental Items 001children.rental\_items\[0\].category: value-001children.rental\_items\[0\].included\_items\_text: value-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-06-01T06:02:55Zchildren.rental\_items\[0\].rental\_item\_status: value-001children.rental\_items\[0\].created: 2026-06-01T06:02:55Zchildren.rental\_items\[0\].updated: 2026-06-01T06:02:55Zchildren.rental\_items\[0\].deleted\_at: 2026-06-01T06:02:55Z
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.created.type": "S",
"root.attributes.created.required": "False",
"root.attributes.created.format": "iso8601",
"root.attributes.created.regex": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?Z?$",
"root.attributes.updated.type": "S",
"root.attributes.updated.required": "False",
"root.attributes.updated.format": "iso8601",
"root.attributes.updated.regex": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?Z?$",
"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.created.type": "S",
"root.attributes.children.attributes.rental_items.items.attributes.created.required": "False",
"root.attributes.children.attributes.rental_items.items.attributes.created.format": "iso8601",
"root.attributes.children.attributes.rental_items.items.attributes.created.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.updated.type": "S",
"root.attributes.children.attributes.rental_items.items.attributes.updated.required": "False",
"root.attributes.children.attributes.rental_items.items.attributes.updated.format": "iso8601",
"root.attributes.children.attributes.rental_items.items.attributes.updated.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.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": "17694391-d710-43b5-b9d8-7c0f9951a27c",
"store_id": "a759206d-4ca5-4adb-b7fe-b1d0b8506b0c",
"order_number": "0001",
"cashier_name": "Sample Hardware Rentals 001",
"terminal_name": "value-001",
"customer_id": "603fea88-5ea3-4e79-8c42-8fefe0b083cb",
"customer_name": "Sample Hardware Rentals 001",
"customer_mobile_number": "0001",
"customer_address": "value-001",
"customer_government_id_type": "company",
"customer_government_id_number": "0001",
"deposit": "1",
"gross_total": "1",
"total_due": "1",
"expected_return_at": "2026-06-01T06:02:55Z",
"rental_status": "value-001",
"print_status": "value-001",
"printed_at": "2026-06-01T06:02:55Z",
"printer_device_id": "ee043b88-fa2d-432e-92da-c9c3b9071686",
"printer_device_name": "Sample Hardware Rentals 001",
"created": "2026-06-01T06:02:55Z",
"updated": "2026-06-01T06:02:55Z",
"deleted_at": "2026-06-01T06:02:55Z",
"children.rental_items[0].rental_item_id": "3f1eadf5-47e9-4b25-ad3a-673ad151f2c7",
"children.rental_items[0].rental_id": "17694391-d710-43b5-b9d8-7c0f9951a27c",
"children.rental_items[0].store_id": "a759206d-4ca5-4adb-b7fe-b1d0b8506b0c",
"children.rental_items[0].toolbox_id": "6f0368ab-6e1c-4a73-98ef-a72547aa1598",
"children.rental_items[0].line_number": "1",
"children.rental_items[0].equipment_name": "Sample Hardware Rental Items 001",
"children.rental_items[0].category": "value-001",
"children.rental_items[0].included_items_text": "value-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-06-01T06:02:55Z",
"children.rental_items[0].rental_item_status": "value-001",
"children.rental_items[0].created": "2026-06-01T06:02:55Z",
"children.rental_items[0].updated": "2026-06-01T06:02:55Z",
"children.rental_items[0].deleted_at": "2026-06-01T06:02:55Z"
}
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\": \"17694391-d710-43b5-b9d8-7c0f9951a27c\", \"store_id\": \"a759206d-4ca5-4adb-b7fe-b1d0b8506b0c\", \"order_number\": \"0001\", \"cashier_name\": \"Sample Hardware Rentals 001\", \"terminal_name\": \"value-001\", \"customer_id\": \"603fea88-5ea3-4e79-8c42-8fefe0b083cb\", \"customer_name\": \"Sample Hardware Rentals 001\", \"customer_mobile_number\": \"0001\", \"customer_address\": \"value-001\", \"customer_government_id_type\": \"company\", \"customer_government_id_number\": \"0001\", \"deposit\": 1, \"gross_total\": 1, \"total_due\": 1, \"expected_return_at\": \"2026-06-01T06:02:55Z\", \"rental_status\": \"value-001\", \"print_status\": \"value-001\", \"printed_at\": \"2026-06-01T06:02:55Z\", \"printer_device_id\": \"ee043b88-fa2d-432e-92da-c9c3b9071686\", \"printer_device_name\": \"Sample Hardware Rentals 001\", \"created\": \"2026-06-01T06:02:55Z\", \"updated\": \"2026-06-01T06:02:55Z\", \"deleted_at\": \"2026-06-01T06:02:55Z\", \"children\": {\"rental_items\": [{\"rental_item_id\": \"3f1eadf5-47e9-4b25-ad3a-673ad151f2c7\", \"rental_id\": \"17694391-d710-43b5-b9d8-7c0f9951a27c\", \"store_id\": \"a759206d-4ca5-4adb-b7fe-b1d0b8506b0c\", \"toolbox_id\": \"6f0368ab-6e1c-4a73-98ef-a72547aa1598\", \"line_number\": 1, \"equipment_name\": \"Sample Hardware Rental Items 001\", \"category\": \"value-001\", \"included_items_text\": \"value-001\", \"rate_per_day\": 1, \"days\": 1, \"subtotal\": 1, \"qr_value\": \"value-001\", \"expected_return_at\": \"2026-06-01T06:02:55Z\", \"rental_item_status\": \"value-001\", \"created\": \"2026-06-01T06:02:55Z\", \"updated\": \"2026-06-01T06:02:55Z\", \"deleted_at\": \"2026-06-01T06:02:55Z\"}]}}"
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": "17694391-d710-43b5-b9d8-7c0f9951a27c", "store_id": "a759206d-4ca5-4adb-b7fe-b1d0b8506b0c", "order_number": "0001", "cashier_name": "Sample Hardware Rentals 001", "terminal_name": "value-001", "customer_id": "603fea88-5ea3-4e79-8c42-8fefe0b083cb", "customer_name": "Sample Hardware Rentals 001", "customer_mobile_number": "0001", "customer_address": "value-001", "customer_government_id_type": "company", "customer_government_id_number": "0001", "deposit": 1, "gross_total": 1, "total_due": 1, "expected_return_at": "2026-06-01T06:02:55Z", "rental_status": "value-001", "print_status": "value-001", "printed_at": "2026-06-01T06:02:55Z", "printer_device_id": "ee043b88-fa2d-432e-92da-c9c3b9071686", "printer_device_name": "Sample Hardware Rentals 001", "created": "2026-06-01T06:02:55Z", "updated": "2026-06-01T06:02:55Z", "deleted_at": "2026-06-01T06:02:55Z", "children": {"rental_items": [{"rental_item_id": "3f1eadf5-47e9-4b25-ad3a-673ad151f2c7", "rental_id": "17694391-d710-43b5-b9d8-7c0f9951a27c", "store_id": "a759206d-4ca5-4adb-b7fe-b1d0b8506b0c", "toolbox_id": "6f0368ab-6e1c-4a73-98ef-a72547aa1598", "line_number": 1, "equipment_name": "Sample Hardware Rental Items 001", "category": "value-001", "included_items_text": "value-001", "rate_per_day": 1, "days": 1, "subtotal": 1, "qr_value": "value-001", "expected_return_at": "2026-06-01T06:02:55Z", "rental_item_status": "value-001", "created": "2026-06-01T06:02:55Z", "updated": "2026-06-01T06:02:55Z", "deleted_at": "2026-06-01T06:02:55Z"}]}}'