rawphp / syncio

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SyncIO

Assumptions

  • All products have a recognisable structure with images and variants
  • Extra attributes allowed, but ignored
  • Payload that does not conform is invalid and will be rejected
  • If product ID is different, do not compare changes as it would not be an apples-to-apples comparison
  • The following attributes are expected to change:
    • title
    • description
    • image position
    • image url
    • variant sku
    • variant barcode
    • variant image
    • variant quantity
    • images can be added, updated and removed
    • variants can be added, updated and removed

Getting Started

composer install
php artisan serve

php artisan test

API

The api requires the following headers to be set:

Content-Type: application/json
Accept: application/json

Update product in store.

The endpoint requires 2 requests. The first one will persist the original product payload. The second and any other request will compare against the first.

PUT http://127.0.0.1:8000/api/products/432232523

About


Languages

Language:PHP 75.8%Language:Blade 24.0%Language:JavaScript 0.2%