- git clone [https://gitlab.com/rex3/product-serialization-service.git] (https://gitlab.com/rex3/product-serialization-service.git)
- create database
- .env file
- composer install
- php artisan key:generate
- php artisan migrate
- php artisan db:seed - Adds REX3 as customer #1. If APP_ENV != production faker adds 9 more.
- php artisan passport:keys
Goto the site root URL, click on the register link to add users. You must enter at least one customer before registering a user.
this returns your bearer token
POST /api/login
Header: Accept: application/json
Parameters: username (username) password (password)
creates a new product
POST /api/v1/products/create
Header: Accept: application/json Authorization: Bearer (token)
Parameters: product (product number) max_serial (maximum serial #)
reserves first available serial number, or optional specified number if available
POST /api/v1/serial_numbers/{product number}/reserve
Headers: Accept: application/json Authorization: Bearer (token)
Parameters: serial_number (optional # - if missing will reserve first available)
releases serial number back into pool of available numbers
POST /api/v1/serial_numbers/{product number}/{number to release}/release
Header: Accept: application/json Authorization: Bearer (token)
Parameters: none
provides the current status of a serial number
GET /api/v1/serial_numbers/{product number}/{number to query}/status
Header: Accept: application/json Authorization: Bearer (token)
Parameters: none