/store-products-patch-one

Summary

  • Source repository: jef-systems/jef-store-backend

  • Source SHA: 8aeea2418405bc456b822b328ee67dbf6f3df16c

  • Source run id: 25872688849

  • Lambda function: jef-store-products-patch-one

  • HTTP method: PATCH

  • API path: /store-products-patch-one

  • Endpoint URL: https://dqo3268ty9.execute-api.ap-southeast-1.amazonaws.com/prod/store-products-patch-one

  • Payload mode: json-body

Description

  • Function: jef-store-products-patch-one

  • Module: jef-store

  • Action: patch-one

  • Method: PATCH

  • Invocation Mode: ASYNC

  • Resource Path: /store-products-patch-one

  • Table: jef-store-products

  • Primary Key: product_number

API Gateway Response

  • status\_code: 202

  • message: Request accepted for asynchronous processing.

Payload Example

  • product\_number: 26f8bbc5-06ff-4167-8390-266d2a2c4303

  • entity\_number: 218ea31f-036f-4b70-a0d6-1207af724d49

  • sku: JEF-AIRF-250G-001

  • product\_name: Airfried Garlic Chips 250g

  • category: Snacks

  • brand: Jef Select

  • description: Crispy airfried garlic chips (250g) with a savory, lightly salted flavor. Great for merienda and sharing.

  • base\_price: 129.0

  • stock\_quantity: 48

  • unit\_label: bag

  • rating: 4.6

  • is\_featured: True

  • tag\_1: best-seller

  • tag\_2: merienda

  • tag\_3: garlic-flavor

  • display\_order: 1

  • is\_active: True

  • is\_deleted: False

  • deleted\_at: 1970-01-01T00:00:00Z

  • created\_at: 2026-05-14T16:36:40Z

  • updated\_at: 2026-05-14T16:36:40Z

  • idempotency\_key: idem-jef-store-products-1

  • schema\_version: 1

  • version: 1

  • children.inventory\_ledger\[0\].inventory\_ledger\_id: 108a0f99-22f3-48ad-94ee-6081ed4f0f3b

  • children.inventory\_ledger\[0\].entity\_number: JEFF-INV-MNL

  • children.inventory\_ledger\[0\].product\_number: 26f8bbc5-06ff-4167-8390-266d2a2c4303

  • children.inventory\_ledger\[0\].sku: JEFF-HR-DRINK-500ML

  • children.inventory\_ledger\[0\].movement\_type: STOCK_IN

  • children.inventory\_ledger\[0\].source\_type: PURCHASE_ORDER

  • children.inventory\_ledger\[0\].source\_number: PO-2026-0507

  • children.inventory\_ledger\[0\].quantity\_before: 120

  • children.inventory\_ledger\[0\].quantity\_delta: 50

  • children.inventory\_ledger\[0\].quantity\_after: 170

  • children.inventory\_ledger\[0\].note: Received 50 units from supplier for restock (MNL warehouse).

  • children.inventory\_ledger\[0\].created\_at: 2026-05-14T16:37:02Z

  • children.inventory\_ledger\[0\].updated\_at: 2026-05-14T16:37:02Z

  • children.inventory\_ledger\[0\].idempotency\_key: idem-jef-store-inventory-ledger-1

  • children.inventory\_ledger\[0\].schema\_version: 1

  • children.inventory\_ledger\[0\].version: 1

Payload Schema

{
  "root.type": "M",
  "root.required": "True",
  "root.attributes.product_number.type": "S",
  "root.attributes.product_number.required": "True",
  "root.attributes.product_number.format": "uuidv4",
  "root.attributes.product_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.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.sku.type": "S",
  "root.attributes.sku.required": "False",
  "root.attributes.sku.regex": "^[A-Za-z0-9 ._-]{1,100}$",
  "root.attributes.product_name.type": "S",
  "root.attributes.product_name.required": "False",
  "root.attributes.product_name.regex": "^[A-Za-z0-9 ._-]{1,100}$",
  "root.attributes.category.type": "S",
  "root.attributes.category.required": "False",
  "root.attributes.category.regex": "^[A-Za-z0-9 ._-]{1,100}$",
  "root.attributes.brand.type": "S",
  "root.attributes.brand.required": "False",
  "root.attributes.brand.regex": "^[A-Za-z0-9 ._-]{1,100}$",
  "root.attributes.description.type": "S",
  "root.attributes.description.required": "False",
  "root.attributes.description.regex": "^.{0,500}$",
  "root.attributes.base_price.type": "N",
  "root.attributes.base_price.required": "False",
  "root.attributes.base_price.regex": "^-?\\d+(\\.\\d+)?$",
  "root.attributes.stock_quantity.type": "N",
  "root.attributes.stock_quantity.required": "False",
  "root.attributes.stock_quantity.regex": "^-?\\d+(\\.\\d+)?$",
  "root.attributes.unit_label.type": "S",
  "root.attributes.unit_label.required": "False",
  "root.attributes.unit_label.regex": "^[A-Za-z0-9 ._-]{1,100}$",
  "root.attributes.rating.type": "N",
  "root.attributes.rating.required": "False",
  "root.attributes.rating.regex": "^-?\\d+(\\.\\d+)?$",
  "root.attributes.is_featured.type": "BOOL",
  "root.attributes.is_featured.required": "False",
  "root.attributes.is_featured.regex": "^(true|false)$",
  "root.attributes.tag_1.type": "S",
  "root.attributes.tag_1.required": "False",
  "root.attributes.tag_1.regex": "^[A-Za-z0-9 ._-]{1,100}$",
  "root.attributes.tag_2.type": "S",
  "root.attributes.tag_2.required": "False",
  "root.attributes.tag_2.regex": "^[A-Za-z0-9 ._-]{1,100}$",
  "root.attributes.tag_3.type": "S",
  "root.attributes.tag_3.required": "False",
  "root.attributes.tag_3.regex": "^[A-Za-z0-9 ._-]{1,100}$",
  "root.attributes.display_order.type": "N",
  "root.attributes.display_order.required": "False",
  "root.attributes.display_order.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.inventory_ledger.type": "L",
  "root.attributes.children.attributes.inventory_ledger.required": "False",
  "root.attributes.children.attributes.inventory_ledger.items.type": "M",
  "root.attributes.children.attributes.inventory_ledger.items.attributes.inventory_ledger_id.type": "S",
  "root.attributes.children.attributes.inventory_ledger.items.attributes.inventory_ledger_id.required": "True",
  "root.attributes.children.attributes.inventory_ledger.items.attributes.inventory_ledger_id.format": "uuidv4",
  "root.attributes.children.attributes.inventory_ledger.items.attributes.inventory_ledger_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.inventory_ledger.items.attributes.entity_number.type": "S",
  "root.attributes.children.attributes.inventory_ledger.items.attributes.entity_number.required": "False",
  "root.attributes.children.attributes.inventory_ledger.items.attributes.entity_number.regex": "^[A-Za-z0-9_-]{1,64}$",
  "root.attributes.children.attributes.inventory_ledger.items.attributes.product_number.type": "S",
  "root.attributes.children.attributes.inventory_ledger.items.attributes.product_number.required": "False",
  "root.attributes.children.attributes.inventory_ledger.items.attributes.product_number.format": "uuidv4",
  "root.attributes.children.attributes.inventory_ledger.items.attributes.product_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.children.attributes.inventory_ledger.items.attributes.sku.type": "S",
  "root.attributes.children.attributes.inventory_ledger.items.attributes.sku.required": "False",
  "root.attributes.children.attributes.inventory_ledger.items.attributes.sku.regex": "^[A-Za-z0-9 ._-]{1,100}$",
  "root.attributes.children.attributes.inventory_ledger.items.attributes.movement_type.type": "S",
  "root.attributes.children.attributes.inventory_ledger.items.attributes.movement_type.required": "False",
  "root.attributes.children.attributes.inventory_ledger.items.attributes.movement_type.regex": "^[A-Za-z0-9_-]{1,64}$",
  "root.attributes.children.attributes.inventory_ledger.items.attributes.source_type.type": "S",
  "root.attributes.children.attributes.inventory_ledger.items.attributes.source_type.required": "False",
  "root.attributes.children.attributes.inventory_ledger.items.attributes.source_type.regex": "^[A-Za-z0-9_-]{1,64}$",
  "root.attributes.children.attributes.inventory_ledger.items.attributes.source_number.type": "S",
  "root.attributes.children.attributes.inventory_ledger.items.attributes.source_number.required": "False",
  "root.attributes.children.attributes.inventory_ledger.items.attributes.source_number.regex": "^[A-Za-z0-9 ._-]{1,100}$",
  "root.attributes.children.attributes.inventory_ledger.items.attributes.quantity_before.type": "N",
  "root.attributes.children.attributes.inventory_ledger.items.attributes.quantity_before.required": "False",
  "root.attributes.children.attributes.inventory_ledger.items.attributes.quantity_before.regex": "^-?\\d+(\\.\\d+)?$",
  "root.attributes.children.attributes.inventory_ledger.items.attributes.quantity_delta.type": "N",
  "root.attributes.children.attributes.inventory_ledger.items.attributes.quantity_delta.required": "False",
  "root.attributes.children.attributes.inventory_ledger.items.attributes.quantity_delta.regex": "^-?\\d+(\\.\\d+)?$",
  "root.attributes.children.attributes.inventory_ledger.items.attributes.quantity_after.type": "N",
  "root.attributes.children.attributes.inventory_ledger.items.attributes.quantity_after.required": "False",
  "root.attributes.children.attributes.inventory_ledger.items.attributes.quantity_after.regex": "^-?\\d+(\\.\\d+)?$",
  "root.attributes.children.attributes.inventory_ledger.items.attributes.note.type": "S",
  "root.attributes.children.attributes.inventory_ledger.items.attributes.note.required": "False",
  "root.attributes.children.attributes.inventory_ledger.items.attributes.note.regex": "^.{0,500}$",
  "root.attributes.children.attributes.inventory_ledger.items.attributes.created_at.type": "S",
  "root.attributes.children.attributes.inventory_ledger.items.attributes.created_at.required": "False",
  "root.attributes.children.attributes.inventory_ledger.items.attributes.created_at.format": "iso8601",
  "root.attributes.children.attributes.inventory_ledger.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.inventory_ledger.items.attributes.updated_at.type": "S",
  "root.attributes.children.attributes.inventory_ledger.items.attributes.updated_at.required": "False",
  "root.attributes.children.attributes.inventory_ledger.items.attributes.updated_at.format": "iso8601",
  "root.attributes.children.attributes.inventory_ledger.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.inventory_ledger.items.attributes.idempotency_key.type": "S",
  "root.attributes.children.attributes.inventory_ledger.items.attributes.idempotency_key.required": "False",
  "root.attributes.children.attributes.inventory_ledger.items.attributes.idempotency_key.regex": "^.{1,300}$",
  "root.attributes.children.attributes.inventory_ledger.items.attributes.schema_version.type": "N",
  "root.attributes.children.attributes.inventory_ledger.items.attributes.schema_version.required": "False",
  "root.attributes.children.attributes.inventory_ledger.items.attributes.schema_version.regex": "^\\d+$",
  "root.attributes.children.attributes.inventory_ledger.items.attributes.version.type": "N",
  "root.attributes.children.attributes.inventory_ledger.items.attributes.version.required": "False",
  "root.attributes.children.attributes.inventory_ledger.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

{
  "product_number": "26f8bbc5-06ff-4167-8390-266d2a2c4303",
  "entity_number": "218ea31f-036f-4b70-a0d6-1207af724d49",
  "sku": "JEF-AIRF-250G-001",
  "product_name": "Airfried Garlic Chips 250g",
  "category": "Snacks",
  "brand": "Jef Select",
  "description": "Crispy airfried garlic chips (250g) with a savory, lightly salted flavor. Great for merienda and sharing.",
  "base_price": "129.0",
  "stock_quantity": "48",
  "unit_label": "bag",
  "rating": "4.6",
  "is_featured": "True",
  "tag_1": "best-seller",
  "tag_2": "merienda",
  "tag_3": "garlic-flavor",
  "display_order": "1",
  "is_active": "True",
  "is_deleted": "False",
  "deleted_at": "1970-01-01T00:00:00Z",
  "created_at": "2026-05-14T16:36:40Z",
  "updated_at": "2026-05-14T16:36:40Z",
  "idempotency_key": "idem-jef-store-products-1",
  "schema_version": "1",
  "version": "1",
  "children.inventory_ledger[0].inventory_ledger_id": "108a0f99-22f3-48ad-94ee-6081ed4f0f3b",
  "children.inventory_ledger[0].entity_number": "JEFF-INV-MNL",
  "children.inventory_ledger[0].product_number": "26f8bbc5-06ff-4167-8390-266d2a2c4303",
  "children.inventory_ledger[0].sku": "JEFF-HR-DRINK-500ML",
  "children.inventory_ledger[0].movement_type": "STOCK_IN",
  "children.inventory_ledger[0].source_type": "PURCHASE_ORDER",
  "children.inventory_ledger[0].source_number": "PO-2026-0507",
  "children.inventory_ledger[0].quantity_before": "120",
  "children.inventory_ledger[0].quantity_delta": "50",
  "children.inventory_ledger[0].quantity_after": "170",
  "children.inventory_ledger[0].note": "Received 50 units from supplier for restock (MNL warehouse).",
  "children.inventory_ledger[0].created_at": "2026-05-14T16:37:02Z",
  "children.inventory_ledger[0].updated_at": "2026-05-14T16:37:02Z",
  "children.inventory_ledger[0].idempotency_key": "idem-jef-store-inventory-ledger-1",
  "children.inventory_ledger[0].schema_version": "1",
  "children.inventory_ledger[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-products-patch-one" -H "Content-Type: application/json" --data-raw "{\"product_number\": \"26f8bbc5-06ff-4167-8390-266d2a2c4303\", \"entity_number\": \"218ea31f-036f-4b70-a0d6-1207af724d49\", \"sku\": \"JEF-AIRF-250G-001\", \"product_name\": \"Airfried Garlic Chips 250g\", \"category\": \"Snacks\", \"brand\": \"Jef Select\", \"description\": \"Crispy airfried garlic chips (250g) with a savory, lightly salted flavor. Great for merienda and sharing.\", \"base_price\": 129.0, \"stock_quantity\": 48, \"unit_label\": \"bag\", \"rating\": 4.6, \"is_featured\": true, \"tag_1\": \"best-seller\", \"tag_2\": \"merienda\", \"tag_3\": \"garlic-flavor\", \"display_order\": 1, \"is_active\": true, \"is_deleted\": false, \"deleted_at\": \"1970-01-01T00:00:00Z\", \"created_at\": \"2026-05-14T16:36:40Z\", \"updated_at\": \"2026-05-14T16:36:40Z\", \"idempotency_key\": \"idem-jef-store-products-1\", \"schema_version\": 1, \"version\": 1, \"children\": {\"inventory_ledger\": [{\"inventory_ledger_id\": \"108a0f99-22f3-48ad-94ee-6081ed4f0f3b\", \"entity_number\": \"JEFF-INV-MNL\", \"product_number\": \"26f8bbc5-06ff-4167-8390-266d2a2c4303\", \"sku\": \"JEFF-HR-DRINK-500ML\", \"movement_type\": \"STOCK_IN\", \"source_type\": \"PURCHASE_ORDER\", \"source_number\": \"PO-2026-0507\", \"quantity_before\": 120, \"quantity_delta\": 50, \"quantity_after\": 170, \"note\": \"Received 50 units from supplier for restock (MNL warehouse).\", \"created_at\": \"2026-05-14T16:37:02Z\", \"updated_at\": \"2026-05-14T16:37:02Z\", \"idempotency_key\": \"idem-jef-store-inventory-ledger-1\", \"schema_version\": 1, \"version\": 1}]}}"

PowerShell curl

curl.exe -X PATCH "https://dqo3268ty9.execute-api.ap-southeast-1.amazonaws.com/prod/store-products-patch-one" -H "Content-Type: application/json" --data-raw '{"product_number": "26f8bbc5-06ff-4167-8390-266d2a2c4303", "entity_number": "218ea31f-036f-4b70-a0d6-1207af724d49", "sku": "JEF-AIRF-250G-001", "product_name": "Airfried Garlic Chips 250g", "category": "Snacks", "brand": "Jef Select", "description": "Crispy airfried garlic chips (250g) with a savory, lightly salted flavor. Great for merienda and sharing.", "base_price": 129.0, "stock_quantity": 48, "unit_label": "bag", "rating": 4.6, "is_featured": true, "tag_1": "best-seller", "tag_2": "merienda", "tag_3": "garlic-flavor", "display_order": 1, "is_active": true, "is_deleted": false, "deleted_at": "1970-01-01T00:00:00Z", "created_at": "2026-05-14T16:36:40Z", "updated_at": "2026-05-14T16:36:40Z", "idempotency_key": "idem-jef-store-products-1", "schema_version": 1, "version": 1, "children": {"inventory_ledger": [{"inventory_ledger_id": "108a0f99-22f3-48ad-94ee-6081ed4f0f3b", "entity_number": "JEFF-INV-MNL", "product_number": "26f8bbc5-06ff-4167-8390-266d2a2c4303", "sku": "JEFF-HR-DRINK-500ML", "movement_type": "STOCK_IN", "source_type": "PURCHASE_ORDER", "source_number": "PO-2026-0507", "quantity_before": 120, "quantity_delta": 50, "quantity_after": 170, "note": "Received 50 units from supplier for restock (MNL warehouse).", "created_at": "2026-05-14T16:37:02Z", "updated_at": "2026-05-14T16:37:02Z", "idempotency_key": "idem-jef-store-inventory-ledger-1", "schema_version": 1, "version": 1}]}}'