/store-carts-patch-one¶
Summary¶
Source repository:
jef-systems/jef-store-backendSource SHA:
8aeea2418405bc456b822b328ee67dbf6f3df16cSource run id:
25872688849Lambda function:
jef-store-carts-patch-oneHTTP method:
PATCHAPI path:
/store-carts-patch-oneEndpoint URL:
https://dqo3268ty9.execute-api.ap-southeast-1.amazonaws.com/prod/store-carts-patch-onePayload mode:
json-body
Description¶
Function: jef-store-carts-patch-oneModule: jef-storeAction: patch-oneMethod: PATCHInvocation Mode: ASYNCResource Path: /store-carts-patch-oneTable: jef-store-cartsPrimary Key: cart_id
API Gateway Response¶
status\_code: 202message: Request accepted for asynchronous processing.
Payload Example¶
cart\_id: d2ea8b40-4712-4f51-b80e-fea7b9531436entity\_number: 218ea31f-036f-4b70-a0d6-1207af724d49employee\_number: EMP-1007customer\_number: CUST-40291order\_mode: PICKUPcart\_status: READY_FOR_PAYMENTsubtotal: 2840.5shipping\_fee: 0discount: 120grand\_total: 2720.5total\_quantity: 6is\_active: Trueis\_deleted: Falsedeleted\_at: 1970-01-01T00:00:00Zcreated\_at: 2026-05-14T16:35:01Zupdated\_at: 2026-05-14T16:35:01Zidempotency\_key: idem-jef-store-carts-1schema\_version: 1version: 1children.cart\_items\[0\].cart\_item\_id: b7e65795-f82f-42b2-a33f-1bd928d0a530children.cart\_items\[0\].cart\_id: d2ea8b40-4712-4f51-b80e-fea7b9531436children.cart\_items\[0\].entity\_number: JEF-ENT-1042children.cart\_items\[0\].product\_number: PRD-55291children.cart\_items\[0\].sku: JEF-BRT-12PK-01children.cart\_items\[0\].product\_name: Brioso Instant Bread 12-Packchildren.cart\_items\[0\].unit\_price: 285.5children.cart\_items\[0\].quantity: 2children.cart\_items\[0\].stock\_quantity\_snapshot: 14children.cart\_items\[0\].line\_total: 571children.cart\_items\[0\].is\_selected: Truechildren.cart\_items\[0\].is\_active: Truechildren.cart\_items\[0\].is\_deleted: Falsechildren.cart\_items\[0\].deleted\_at: 1970-01-01T00:00:00Zchildren.cart\_items\[0\].created\_at: 2026-05-14T16:36:48Zchildren.cart\_items\[0\].updated\_at: 2026-05-14T16:36:48Zchildren.cart\_items\[0\].idempotency\_key: idem-jef-store-cart-items-1children.cart\_items\[0\].schema\_version: 1children.cart\_items\[0\].version: 1
Payload Schema¶
{
"root.type": "M",
"root.required": "True",
"root.attributes.cart_id.type": "S",
"root.attributes.cart_id.required": "True",
"root.attributes.cart_id.format": "uuidv4",
"root.attributes.cart_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.entity_number.type": "S",
"root.attributes.entity_number.required": "False",
"root.attributes.entity_number.format": "uuidv4",
"root.attributes.entity_number.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.employee_number.type": "S",
"root.attributes.employee_number.required": "False",
"root.attributes.employee_number.regex": "^[A-Za-z0-9_-]{1,64}$",
"root.attributes.customer_number.type": "S",
"root.attributes.customer_number.required": "False",
"root.attributes.customer_number.regex": "^[A-Za-z0-9_-]{1,64}$",
"root.attributes.order_mode.type": "S",
"root.attributes.order_mode.required": "False",
"root.attributes.order_mode.regex": "^[A-Za-z0-9_-]{1,64}$",
"root.attributes.cart_status.type": "S",
"root.attributes.cart_status.required": "False",
"root.attributes.cart_status.regex": "^[A-Za-z0-9_-]{1,64}$",
"root.attributes.subtotal.type": "N",
"root.attributes.subtotal.required": "False",
"root.attributes.subtotal.regex": "^-?\\d+(\\.\\d+)?$",
"root.attributes.shipping_fee.type": "N",
"root.attributes.shipping_fee.required": "False",
"root.attributes.shipping_fee.regex": "^-?\\d+(\\.\\d+)?$",
"root.attributes.discount.type": "N",
"root.attributes.discount.required": "False",
"root.attributes.discount.regex": "^-?\\d+(\\.\\d+)?$",
"root.attributes.grand_total.type": "N",
"root.attributes.grand_total.required": "False",
"root.attributes.grand_total.regex": "^-?\\d+(\\.\\d+)?$",
"root.attributes.total_quantity.type": "N",
"root.attributes.total_quantity.required": "False",
"root.attributes.total_quantity.regex": "^\\d+$",
"root.attributes.is_active.type": "BOOL",
"root.attributes.is_active.required": "False",
"root.attributes.is_active.regex": "^(true|false)$",
"root.attributes.is_deleted.type": "BOOL",
"root.attributes.is_deleted.required": "False",
"root.attributes.is_deleted.regex": "^(true|false)$",
"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.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.idempotency_key.type": "S",
"root.attributes.idempotency_key.required": "False",
"root.attributes.idempotency_key.regex": "^.{1,300}$",
"root.attributes.schema_version.type": "N",
"root.attributes.schema_version.required": "False",
"root.attributes.schema_version.regex": "^\\d+$",
"root.attributes.version.type": "N",
"root.attributes.version.required": "False",
"root.attributes.version.regex": "^\\d+$",
"root.attributes.children.type": "M",
"root.attributes.children.required": "False",
"root.attributes.children.attributes.cart_items.type": "L",
"root.attributes.children.attributes.cart_items.required": "False",
"root.attributes.children.attributes.cart_items.items.type": "M",
"root.attributes.children.attributes.cart_items.items.attributes.cart_item_id.type": "S",
"root.attributes.children.attributes.cart_items.items.attributes.cart_item_id.required": "True",
"root.attributes.children.attributes.cart_items.items.attributes.cart_item_id.format": "uuidv4",
"root.attributes.children.attributes.cart_items.items.attributes.cart_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.cart_items.items.attributes.cart_id.type": "S",
"root.attributes.children.attributes.cart_items.items.attributes.cart_id.required": "False",
"root.attributes.children.attributes.cart_items.items.attributes.cart_id.format": "uuidv4",
"root.attributes.children.attributes.cart_items.items.attributes.cart_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.cart_items.items.attributes.entity_number.type": "S",
"root.attributes.children.attributes.cart_items.items.attributes.entity_number.required": "False",
"root.attributes.children.attributes.cart_items.items.attributes.entity_number.regex": "^[A-Za-z0-9_-]{1,64}$",
"root.attributes.children.attributes.cart_items.items.attributes.product_number.type": "S",
"root.attributes.children.attributes.cart_items.items.attributes.product_number.required": "False",
"root.attributes.children.attributes.cart_items.items.attributes.product_number.regex": "^[A-Za-z0-9_-]{1,64}$",
"root.attributes.children.attributes.cart_items.items.attributes.sku.type": "S",
"root.attributes.children.attributes.cart_items.items.attributes.sku.required": "False",
"root.attributes.children.attributes.cart_items.items.attributes.sku.regex": "^[A-Za-z0-9 ._-]{1,100}$",
"root.attributes.children.attributes.cart_items.items.attributes.product_name.type": "S",
"root.attributes.children.attributes.cart_items.items.attributes.product_name.required": "False",
"root.attributes.children.attributes.cart_items.items.attributes.product_name.regex": "^[A-Za-z0-9 ._-]{1,100}$",
"root.attributes.children.attributes.cart_items.items.attributes.unit_price.type": "N",
"root.attributes.children.attributes.cart_items.items.attributes.unit_price.required": "False",
"root.attributes.children.attributes.cart_items.items.attributes.unit_price.regex": "^-?\\d+(\\.\\d+)?$",
"root.attributes.children.attributes.cart_items.items.attributes.quantity.type": "N",
"root.attributes.children.attributes.cart_items.items.attributes.quantity.required": "False",
"root.attributes.children.attributes.cart_items.items.attributes.quantity.regex": "^-?\\d+(\\.\\d+)?$",
"root.attributes.children.attributes.cart_items.items.attributes.stock_quantity_snapshot.type": "N",
"root.attributes.children.attributes.cart_items.items.attributes.stock_quantity_snapshot.required": "False",
"root.attributes.children.attributes.cart_items.items.attributes.stock_quantity_snapshot.regex": "^-?\\d+(\\.\\d+)?$",
"root.attributes.children.attributes.cart_items.items.attributes.line_total.type": "N",
"root.attributes.children.attributes.cart_items.items.attributes.line_total.required": "False",
"root.attributes.children.attributes.cart_items.items.attributes.line_total.regex": "^-?\\d+(\\.\\d+)?$",
"root.attributes.children.attributes.cart_items.items.attributes.is_selected.type": "BOOL",
"root.attributes.children.attributes.cart_items.items.attributes.is_selected.required": "False",
"root.attributes.children.attributes.cart_items.items.attributes.is_selected.regex": "^(true|false)$",
"root.attributes.children.attributes.cart_items.items.attributes.is_active.type": "BOOL",
"root.attributes.children.attributes.cart_items.items.attributes.is_active.required": "False",
"root.attributes.children.attributes.cart_items.items.attributes.is_active.regex": "^(true|false)$",
"root.attributes.children.attributes.cart_items.items.attributes.is_deleted.type": "BOOL",
"root.attributes.children.attributes.cart_items.items.attributes.is_deleted.required": "False",
"root.attributes.children.attributes.cart_items.items.attributes.is_deleted.regex": "^(true|false)$",
"root.attributes.children.attributes.cart_items.items.attributes.deleted_at.type": "S",
"root.attributes.children.attributes.cart_items.items.attributes.deleted_at.required": "False",
"root.attributes.children.attributes.cart_items.items.attributes.deleted_at.format": "iso8601",
"root.attributes.children.attributes.cart_items.items.attributes.deleted_at.regex": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?Z?$",
"root.attributes.children.attributes.cart_items.items.attributes.created_at.type": "S",
"root.attributes.children.attributes.cart_items.items.attributes.created_at.required": "False",
"root.attributes.children.attributes.cart_items.items.attributes.created_at.format": "iso8601",
"root.attributes.children.attributes.cart_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.cart_items.items.attributes.updated_at.type": "S",
"root.attributes.children.attributes.cart_items.items.attributes.updated_at.required": "False",
"root.attributes.children.attributes.cart_items.items.attributes.updated_at.format": "iso8601",
"root.attributes.children.attributes.cart_items.items.attributes.updated_at.regex": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,6})?Z?$",
"root.attributes.children.attributes.cart_items.items.attributes.idempotency_key.type": "S",
"root.attributes.children.attributes.cart_items.items.attributes.idempotency_key.required": "False",
"root.attributes.children.attributes.cart_items.items.attributes.idempotency_key.regex": "^.{1,300}$",
"root.attributes.children.attributes.cart_items.items.attributes.schema_version.type": "N",
"root.attributes.children.attributes.cart_items.items.attributes.schema_version.required": "False",
"root.attributes.children.attributes.cart_items.items.attributes.schema_version.regex": "^\\d+$",
"root.attributes.children.attributes.cart_items.items.attributes.version.type": "N",
"root.attributes.children.attributes.cart_items.items.attributes.version.required": "False",
"root.attributes.children.attributes.cart_items.items.attributes.version.regex": "^\\d+$"
}
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¶
{
"cart_id": "d2ea8b40-4712-4f51-b80e-fea7b9531436",
"entity_number": "218ea31f-036f-4b70-a0d6-1207af724d49",
"employee_number": "EMP-1007",
"customer_number": "CUST-40291",
"order_mode": "PICKUP",
"cart_status": "READY_FOR_PAYMENT",
"subtotal": "2840.5",
"shipping_fee": "0",
"discount": "120",
"grand_total": "2720.5",
"total_quantity": "6",
"is_active": "True",
"is_deleted": "False",
"deleted_at": "1970-01-01T00:00:00Z",
"created_at": "2026-05-14T16:35:01Z",
"updated_at": "2026-05-14T16:35:01Z",
"idempotency_key": "idem-jef-store-carts-1",
"schema_version": "1",
"version": "1",
"children.cart_items[0].cart_item_id": "b7e65795-f82f-42b2-a33f-1bd928d0a530",
"children.cart_items[0].cart_id": "d2ea8b40-4712-4f51-b80e-fea7b9531436",
"children.cart_items[0].entity_number": "JEF-ENT-1042",
"children.cart_items[0].product_number": "PRD-55291",
"children.cart_items[0].sku": "JEF-BRT-12PK-01",
"children.cart_items[0].product_name": "Brioso Instant Bread 12-Pack",
"children.cart_items[0].unit_price": "285.5",
"children.cart_items[0].quantity": "2",
"children.cart_items[0].stock_quantity_snapshot": "14",
"children.cart_items[0].line_total": "571",
"children.cart_items[0].is_selected": "True",
"children.cart_items[0].is_active": "True",
"children.cart_items[0].is_deleted": "False",
"children.cart_items[0].deleted_at": "1970-01-01T00:00:00Z",
"children.cart_items[0].created_at": "2026-05-14T16:36:48Z",
"children.cart_items[0].updated_at": "2026-05-14T16:36:48Z",
"children.cart_items[0].idempotency_key": "idem-jef-store-cart-items-1",
"children.cart_items[0].schema_version": "1",
"children.cart_items[0].version": "1"
}
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://dqo3268ty9.execute-api.ap-southeast-1.amazonaws.com/prod/store-carts-patch-one" -H "Content-Type: application/json" --data-raw "{\"cart_id\": \"d2ea8b40-4712-4f51-b80e-fea7b9531436\", \"entity_number\": \"218ea31f-036f-4b70-a0d6-1207af724d49\", \"employee_number\": \"EMP-1007\", \"customer_number\": \"CUST-40291\", \"order_mode\": \"PICKUP\", \"cart_status\": \"READY_FOR_PAYMENT\", \"subtotal\": 2840.5, \"shipping_fee\": 0, \"discount\": 120, \"grand_total\": 2720.5, \"total_quantity\": 6, \"is_active\": true, \"is_deleted\": false, \"deleted_at\": \"1970-01-01T00:00:00Z\", \"created_at\": \"2026-05-14T16:35:01Z\", \"updated_at\": \"2026-05-14T16:35:01Z\", \"idempotency_key\": \"idem-jef-store-carts-1\", \"schema_version\": 1, \"version\": 1, \"children\": {\"cart_items\": [{\"cart_item_id\": \"b7e65795-f82f-42b2-a33f-1bd928d0a530\", \"cart_id\": \"d2ea8b40-4712-4f51-b80e-fea7b9531436\", \"entity_number\": \"JEF-ENT-1042\", \"product_number\": \"PRD-55291\", \"sku\": \"JEF-BRT-12PK-01\", \"product_name\": \"Brioso Instant Bread 12-Pack\", \"unit_price\": 285.5, \"quantity\": 2, \"stock_quantity_snapshot\": 14, \"line_total\": 571, \"is_selected\": true, \"is_active\": true, \"is_deleted\": false, \"deleted_at\": \"1970-01-01T00:00:00Z\", \"created_at\": \"2026-05-14T16:36:48Z\", \"updated_at\": \"2026-05-14T16:36:48Z\", \"idempotency_key\": \"idem-jef-store-cart-items-1\", \"schema_version\": 1, \"version\": 1}]}}"
PowerShell curl¶
curl.exe -X PATCH "https://dqo3268ty9.execute-api.ap-southeast-1.amazonaws.com/prod/store-carts-patch-one" -H "Content-Type: application/json" --data-raw '{"cart_id": "d2ea8b40-4712-4f51-b80e-fea7b9531436", "entity_number": "218ea31f-036f-4b70-a0d6-1207af724d49", "employee_number": "EMP-1007", "customer_number": "CUST-40291", "order_mode": "PICKUP", "cart_status": "READY_FOR_PAYMENT", "subtotal": 2840.5, "shipping_fee": 0, "discount": 120, "grand_total": 2720.5, "total_quantity": 6, "is_active": true, "is_deleted": false, "deleted_at": "1970-01-01T00:00:00Z", "created_at": "2026-05-14T16:35:01Z", "updated_at": "2026-05-14T16:35:01Z", "idempotency_key": "idem-jef-store-carts-1", "schema_version": 1, "version": 1, "children": {"cart_items": [{"cart_item_id": "b7e65795-f82f-42b2-a33f-1bd928d0a530", "cart_id": "d2ea8b40-4712-4f51-b80e-fea7b9531436", "entity_number": "JEF-ENT-1042", "product_number": "PRD-55291", "sku": "JEF-BRT-12PK-01", "product_name": "Brioso Instant Bread 12-Pack", "unit_price": 285.5, "quantity": 2, "stock_quantity_snapshot": 14, "line_total": 571, "is_selected": true, "is_active": true, "is_deleted": false, "deleted_at": "1970-01-01T00:00:00Z", "created_at": "2026-05-14T16:36:48Z", "updated_at": "2026-05-14T16:36:48Z", "idempotency_key": "idem-jef-store-cart-items-1", "schema_version": 1, "version": 1}]}}'