diff --git a/app/Classes/Modules/Orders/ControllersLogic/CreateOrderLogic.php b/app/Classes/Modules/Orders/ControllersLogic/CreateOrderLogic.php index cd8d43c9..42e625c2 100644 --- a/app/Classes/Modules/Orders/ControllersLogic/CreateOrderLogic.php +++ b/app/Classes/Modules/Orders/ControllersLogic/CreateOrderLogic.php @@ -35,12 +35,6 @@ class CreateOrderLogic extends AbstractControllerLogic $order = $this->createOrderProcessor->execute($request); - //$order_object = new OrderObject($request->get('company_module_id'), '', '', OrderType::SHARED_CONTAINER, OrderStatus::PROCESSING, OrderSteps::PROCESSING); - - //$this->canCreateOrder->passes($order_object); - - //$order = $this->createsOrder->execute($order_object); - return $this->resourceResponse(new OrderResource($order)); } -} \ No newline at end of file +} diff --git a/app/Classes/Modules/Orders/Processors/CreateOrderProcessor.php b/app/Classes/Modules/Orders/Processors/CreateOrderProcessor.php index 85e5ae50..1252efe9 100644 --- a/app/Classes/Modules/Orders/Processors/CreateOrderProcessor.php +++ b/app/Classes/Modules/Orders/Processors/CreateOrderProcessor.php @@ -51,6 +51,8 @@ class CreateOrderProcessor //Pre-approved order, no need Admin to process it $this->confirmOrderProcessor->execute($order->id); + //TODO: Add order roles - Allow multiple entity to process this order + return $order; } } diff --git a/app/Classes/Modules/PackingLists/ControllersLogic/FetchContainerPackingListLogic.php b/app/Classes/Modules/PackingLists/ControllersLogic/FetchContainerPackingListLogic.php new file mode 100644 index 00000000..e9248ada --- /dev/null +++ b/app/Classes/Modules/PackingLists/ControllersLogic/FetchContainerPackingListLogic.php @@ -0,0 +1,66 @@ + 'Retrieved PackingList', + 'message' => 'You have successfully retrieved a PackingList' + ]; + } + + /** @var CanFetchPackingList */ + private $canFetchPackingList; + + /** @var FetchesPackingList */ + private $fetchesPackingList; + + /** + * FetchPackingListControllersLogic constructor. + * @param CanFetchPackingList $canFetchPackingList + * @param FetchesPackingList $fetchesPackingList + */ + public function __construct(CanFetchPackingList $canFetchPackingList, FetchesPackingList $fetchesPackingList) + { + $this->canFetchPackingList = $canFetchPackingList; + $this->fetchesPackingList = $fetchesPackingList; + } + + + /** + * @param Request $request + * @return JsonResponse + * @throws ErrorException + */ + public function logic(Request $request) : JsonResponse + { + try { + + $this->canFetchPackingList->passes(); + + $query = $this->fetchesPackingList->execute(['id' => $request->route('id')]); + + return $this->resourceResponse(new PackingListResource($query)); + + } catch (\Exception $exception){ + throw new ErrorException($exception->getMessage(), $exception->getCode()); + } + + } + +} diff --git a/app/Classes/Modules/Remarks/ControllersLogic/DeleteRemarkLogic.php b/app/Classes/Modules/Remarks/ControllersLogic/DeleteRemarkLogic.php index f731cca5..b593d603 100644 --- a/app/Classes/Modules/Remarks/ControllersLogic/DeleteRemarkLogic.php +++ b/app/Classes/Modules/Remarks/ControllersLogic/DeleteRemarkLogic.php @@ -54,20 +54,13 @@ class DeleteRemarkLogic extends AbstractControllerLogic */ public function logic(Request $request) : JsonResponse { - try { + $this->canDeleteRemark->passes(); - $this->canDeleteRemark->passes(); + $query = $this->fetchesRemark->execute(['id' => $request->route('id')]); - $query = $this->fetchesRemark->execute(['id' => $request->route('id')]); - - $this->deletesRemark->execute($query); - - return $this->response([]); - - } catch (\Exception $exception){ - throw new ErrorException($exception->getMessage(), $exception->getCode()); - } + $this->deletesRemark->execute($query); + return $this->response([]); } } diff --git a/app/Classes/Modules/Remarks/ControllersLogic/FetchRemarkLogic.php b/app/Classes/Modules/Remarks/ControllersLogic/FetchRemarkLogic.php index 3ff151d3..9c5aa5af 100644 --- a/app/Classes/Modules/Remarks/ControllersLogic/FetchRemarkLogic.php +++ b/app/Classes/Modules/Remarks/ControllersLogic/FetchRemarkLogic.php @@ -49,18 +49,11 @@ class FetchRemarkLogic extends AbstractControllerLogic */ public function logic(Request $request) : JsonResponse { - try { + $this->canFetchRemark->passes(); - $this->canFetchRemark->passes(); - - $query = $this->fetchesRemark->execute(['id' => $request->route('id')]); - - return $this->resourceResponse(new RemarkResource($query)); - - } catch (\Exception $exception){ - throw new ErrorException($exception->getMessage(), $exception->getCode()); - } + $query = $this->fetchesRemark->execute(['id' => $request->route('id')]); + return $this->resourceResponse(new RemarkResource($query)); } } diff --git a/app/Classes/Modules/Remarks/ControllersLogic/ListRemarksLogic.php b/app/Classes/Modules/Remarks/ControllersLogic/ListRemarksLogic.php index a7d7ff43..c70ccee1 100644 --- a/app/Classes/Modules/Remarks/ControllersLogic/ListRemarksLogic.php +++ b/app/Classes/Modules/Remarks/ControllersLogic/ListRemarksLogic.php @@ -49,18 +49,11 @@ class ListRemarksLogic extends AbstractControllerLogic */ public function logic(Request $request) : JsonResponse { - try { + $this->canListRemarks->passes(); - $this->canListRemarks->passes(); - - $query = $this->listsRemarks->execute($this->listsRemarks->deserializeFilters($request->input('filters'))); - - return $this->collectionResponse(RemarkResource::collection($query)); - - } catch (\Exception $exception){ - throw new ErrorException($exception->getMessage(), $exception->getCode()); - } + $query = $this->listsRemarks->execute($this->listsRemarks->deserializeFilters($request->input('filters'))); + return $this->collectionResponse(RemarkResource::collection($query)); } } diff --git a/app/Classes/Modules/Remarks/ControllersLogic/UpdateRemarkLogic.php b/app/Classes/Modules/Remarks/ControllersLogic/UpdateRemarkLogic.php index c29799dd..0649c857 100644 --- a/app/Classes/Modules/Remarks/ControllersLogic/UpdateRemarkLogic.php +++ b/app/Classes/Modules/Remarks/ControllersLogic/UpdateRemarkLogic.php @@ -62,7 +62,6 @@ class UpdateRemarkLogic extends AbstractControllerLogic */ public function logic(Request $request) : JsonResponse { - $object = new RemarkObject($request->input('comment'), $request->input('commenter_id')); $this->canUpdateRemark->passes($object); @@ -72,7 +71,6 @@ class UpdateRemarkLogic extends AbstractControllerLogic $query = $this->updatesRemark->execute($query, $object); return $this->resourceResponse(new RemarkResource($query)); - } } diff --git a/app/Classes/Modules/Schedules/DataTransferObjects/ScheduleObject.php b/app/Classes/Modules/Schedules/DataTransferObjects/ScheduleObject.php index b92211d3..956cd24d 100644 --- a/app/Classes/Modules/Schedules/DataTransferObjects/ScheduleObject.php +++ b/app/Classes/Modules/Schedules/DataTransferObjects/ScheduleObject.php @@ -35,7 +35,7 @@ class ScheduleObject implements DataTransferObject */ public function getETD(): Carbon { - return $this->completed_date ? Carbon::parse($this->etd); + return Carbon::parse($this->etd); } /** @@ -43,7 +43,7 @@ class ScheduleObject implements DataTransferObject */ public function getETA(): Carbon { - return $this->completed_date ? Carbon::parse($this->eta); + return Carbon::parse($this->eta); } /** diff --git a/app/Classes/Modules/Schedules/Services/CreatesSchedule.php b/app/Classes/Modules/Schedules/Services/CreatesSchedule.php index 20a064e3..60e9913a 100644 --- a/app/Classes/Modules/Schedules/Services/CreatesSchedule.php +++ b/app/Classes/Modules/Schedules/Services/CreatesSchedule.php @@ -6,18 +6,18 @@ use App\Classes\General\Eloquent\AbstractUpdateRecord; use App\Classes\General\Eloquent\AbstractUpdateRelationshipRecord; use App\Classes\Modules\Schedules\DataTransferObjects\ScheduleObject; use App\Models\Schedule; -use App\Models\TransportArrangement; +use App\Models\Transport; class CreatesSchedule extends AbstractUpdateRelationshipRecord { /** - * @param TransportArrangement $transport + * @param Transport $transport * @param ScheduleObject $object * @return \Illuminate\Database\Eloquent\Model * @throws \App\Classes\Exceptions\MalformedRequestException */ - public function execute(TransportArrangement $transport, ScheduleObject $object) { + public function execute(Transport $transport, ScheduleObject $object) { $model = new Schedule(); $model->etd = $object->getETD(); $model->eta = $object->getETA(); diff --git a/app/Classes/Modules/Transports/ControllersLogic/CreateTransportLogic.php b/app/Classes/Modules/Transports/ControllersLogic/CreateTransportLogic.php index b3e8d554..1b30b95d 100644 --- a/app/Classes/Modules/Transports/ControllersLogic/CreateTransportLogic.php +++ b/app/Classes/Modules/Transports/ControllersLogic/CreateTransportLogic.php @@ -8,7 +8,7 @@ use App\Classes\Modules\Transports\Services\CreatesTransport; use App\Classes\Modules\Transports\Services\FetchesDistrict; use App\Classes\Modules\Transports\Standards\Rules\CanCreateTransport; use App\Classes\Modules\Transports\DataTransferObjects\TransportObject; -use App\Classes\Modules\Companies\Services\FetchesCompany; +use App\Classes\Modules\PackingLists\Services\FetchesContainerPackingList; use App\Http\Resources\TransportResource; use ErrorException; use Illuminate\Http\JsonResponse; @@ -30,11 +30,8 @@ class CreateTransportLogic extends AbstractControllerLogic /** @var CanCreateTransport */ private $canCreateTransport; - /** @var FetchesDistrict */ - private $fetchesDistrict; - - /** @var FetchesCompany */ - private $fetchesCompany; + /** @var FetchesContainerPackingList */ + private $fetchesContainerPackingList; /** @var CreatesTransport */ private $createsTransport; @@ -42,15 +39,13 @@ class CreateTransportLogic extends AbstractControllerLogic /** * CreateTransportLogic constructor. * @param CanCreateTransport $canCreateTransport - * @param FetchesDistrict $fetchesDistrict - * @param FetchesCompany $fetchesCompany + * @param FetchesContainerPackingList $fetchesContainerPackingList * @param CreatesTransport $createsTransport */ - public function __construct(CanCreateTransport $canCreateTransport, FetchesDistrict $fetchesDistrict, FetchesCompany $fetchesCompany, CreatesTransport $createsTransport) + public function __construct(CanCreateTransport $canCreateTransport, FetchesContainerPackingList $fetchesContainerPackingList, CreatesTransport $createsTransport) { $this->canCreateTransport = $canCreateTransport; - $this->fetchesDistrict = $fetchesDistrict; - $this->fetchesCompany = $fetchesCompany; + $this->fetchesContainerPackingList = $fetchesContainerPackingList; $this->createsTransport = $createsTransport; } @@ -64,13 +59,11 @@ class CreateTransportLogic extends AbstractControllerLogic public function logic(Request $request) : JsonResponse { - $district = $this->fetchesDistrict->execute(['id' => $request->input('district_id')]); - - $object = new TransportObject($request->input('street_one'), $request->input('street_two'), $district->country_id, $district->state_id, $district->id, $request->input('post_code')); + $object = new TransportObject($request->input('type'), $request->input('courier'), $request->input('tracking_number'), null, null, 0); $this->canCreateTransport->passes($object); - $query = $this->createsTransport->execute($this->fetchesCompany->execute(['id' => $request->input('company_id')]), $object); + $query = $this->createsTransport->execute($this->fetchesContainerPackingList->execute(['id' => $request->input('container_id')]), $object); return $this->resourceResponse(new TransportResource($query)); diff --git a/app/Classes/Modules/Transports/ControllersLogic/DeleteTransportLogic.php b/app/Classes/Modules/Transports/ControllersLogic/DeleteTransportLogic.php index c21afd27..03c01168 100644 --- a/app/Classes/Modules/Transports/ControllersLogic/DeleteTransportLogic.php +++ b/app/Classes/Modules/Transports/ControllersLogic/DeleteTransportLogic.php @@ -54,20 +54,13 @@ class DeleteTransportLogic extends AbstractControllerLogic */ public function logic(Request $request) : JsonResponse { - try { + $this->canDeleteTransport->passes(); - $this->canDeleteTransport->passes(); + $query = $this->fetchesTransport->execute(['id' => $request->route('id')]); - $query = $this->fetchesTransport->execute(['id' => $request->route('id')]); - - $this->deletesTransport->execute($query); - - return $this->response([]); - - } catch (\Exception $exception){ - throw new ErrorException($exception->getMessage(), $exception->getCode()); - } + $this->deletesTransport->execute($query); + return $this->response([]); } } diff --git a/app/Classes/Modules/Transports/ControllersLogic/FetchTransportLogic.php b/app/Classes/Modules/Transports/ControllersLogic/FetchTransportLogic.php index ed624581..6129e6ed 100644 --- a/app/Classes/Modules/Transports/ControllersLogic/FetchTransportLogic.php +++ b/app/Classes/Modules/Transports/ControllersLogic/FetchTransportLogic.php @@ -49,18 +49,11 @@ class FetchTransportLogic extends AbstractControllerLogic */ public function logic(Request $request) : JsonResponse { - try { + $this->canFetchTransport->passes(); - $this->canFetchTransport->passes(); - - $query = $this->fetchesTransport->execute(['id' => $request->route('id')]); - - return $this->resourceResponse(new TransportResource($query)); - - } catch (\Exception $exception){ - throw new ErrorException($exception->getMessage(), $exception->getCode()); - } + $query = $this->fetchesTransport->execute(['id' => $request->route('id')]); + return $this->resourceResponse(new TransportResource($query)); } } diff --git a/app/Classes/Modules/Transports/ControllersLogic/ListTransportsLogic.php b/app/Classes/Modules/Transports/ControllersLogic/ListTransportsLogic.php index 2d5d1bc5..b85e07e7 100644 --- a/app/Classes/Modules/Transports/ControllersLogic/ListTransportsLogic.php +++ b/app/Classes/Modules/Transports/ControllersLogic/ListTransportsLogic.php @@ -49,18 +49,11 @@ class ListTransportsLogic extends AbstractControllerLogic */ public function logic(Request $request) : JsonResponse { - try { + $this->canListTransports->passes(); - $this->canListTransports->passes(); - - $query = $this->listsTransports->execute($this->listsTransports->deserializeFilters($request->input('filters'))); - - return $this->collectionResponse(TransportResource::collection($query)); - - } catch (\Exception $exception){ - throw new ErrorException($exception->getMessage(), $exception->getCode()); - } + $query = $this->listsTransports->execute($this->listsTransports->deserializeFilters($request->input('filters'))); + return $this->collectionResponse(TransportResource::collection($query)); } } diff --git a/app/Classes/Modules/Transports/ControllersLogic/UpdateTransportLogic.php b/app/Classes/Modules/Transports/ControllersLogic/UpdateTransportLogic.php index b6925003..c8630224 100644 --- a/app/Classes/Modules/Transports/ControllersLogic/UpdateTransportLogic.php +++ b/app/Classes/Modules/Transports/ControllersLogic/UpdateTransportLogic.php @@ -62,25 +62,15 @@ class UpdateTransportLogic extends AbstractControllerLogic */ public function logic(Request $request) : JsonResponse { - try { + $object = new TransportObject($request->input('type'), $request->input('courier'), $request->input('tracking_number'), $request->input('dispact_date'), $request->input('drop_date'), $request->input('status')); - $district = $this->fetchesDistrict->execute(['id' => $request->input('district_id')]); - $object = new TransportObject($request->input('street_one'), $request->input('street_two'), $district->country_id, $district->state_id, $district->id, $request->input('post_code')); - //$object = new TransportObject($request->input('company_id'), $request->input('street_one'), $request->input('street_two'), $request->input('city'), $request->input('state'), $request->input('post_code'), $request->input('country'), $request->input('default'), $request->input('billing')); + $this->canUpdateTransport->passes($object); - $this->canUpdateTransport->passes($object); + $query = $this->fetchesTransport->execute(['id' => $request->route('id')]); - $query = $this->fetchesTransport->execute(['id' => $request->route('id')]); - - $query = $this->updatesTransport->execute($query, $object); - - return $this->resourceResponse(new TransportResource($query)); - - - } catch (\Exception $exception){ - throw new ErrorException($exception->getMessage(), $exception->getCode()); - } + $query = $this->updatesTransport->execute($query, $object); + return $this->resourceResponse(new TransportResource($query)); } } diff --git a/app/Classes/Modules/Transports/DataTransferObjects/TransportObject.php b/app/Classes/Modules/Transports/DataTransferObjects/TransportObject.php index 9b90b930..4f82c78b 100644 --- a/app/Classes/Modules/Transports/DataTransferObjects/TransportObject.php +++ b/app/Classes/Modules/Transports/DataTransferObjects/TransportObject.php @@ -3,51 +3,52 @@ namespace App\Classes\Modules\Transports\DataTransferObjects; use App\Classes\General\Interfaces\DataTransferObject; +use Carbon\Carbon; class TransportObject implements DataTransferObject { /** @var string */ - private $streetOne; + private $type; /** @var string|null */ - private $streetTwo; + private $courier; /** @var int */ - private $countryId; + private $tracking_number; /** @var int */ - private $stateId; + private $dispacth_date; /** @var int */ - private $districtId; + private $drop_date; /** @var int */ - private $postCode; + private $status; /** * TransportObject constructor. - * @param string $streetOne - * @param null|string $streetTwo - * @param int $countryId - * @param int $stateId - * @param int $districtId - * @param int $postCode + * @param string $type + * @param null|string $courier + * @param int $tracking_number + * @param int $dispatch_date + * @param int $drop_date + * @param int $status */ - public function __construct(string $streetOne, ?string $streetTwo, int $countryId, int $stateId, int $districtId, int $postCode) + public function __construct(string $type, string $courier, int $tracking_number, ?string $dispatch_date, ?string $drop_date, int $status) { - $this->streetOne = $streetOne; - $this->streetTwo = $streetTwo; - $this->countryId = $countryId; - $this->stateId = $stateId; - $this->districtId = $districtId; - $this->postCode = $postCode; + $this->type = $type; + $this->courier = $courier; + $this->tracking_number = $tracking_number; + $this->dispatch_date = $dispatch_date; + $this->drop_date = $drop_date; + $this->status = $status; } /** * @return string */ - public function getStreetOne(): string + public function getType(): string { return $this->streetOne; } @@ -55,7 +56,7 @@ class TransportObject implements DataTransferObject /** * @return null|string */ - public function getStreetTwo(): ?string + public function getCourier(): ?string { return $this->streetTwo; } @@ -63,7 +64,7 @@ class TransportObject implements DataTransferObject /** * @return int */ - public function getCountryId(): int + public function getTrackingNumber(): int { return $this->countryId; } @@ -71,25 +72,25 @@ class TransportObject implements DataTransferObject /** * @return int */ - public function getStateId(): int + public function getDispatchDate(): Carbon { - return $this->stateId; + return $this->dispatch_date ? Carbon::parse($this->dispatch_date) : null; } /** * @return int */ - public function getDistrictId(): int + public function getDropDate(): Carbon { - return $this->districtId; + return $this->drop_date ? Carbon::parse($this->drop_date) : null; } /** * @return int */ - public function getPostCode(): int + public function getStatus(): int { - return $this->postCode; + return $this->status; } diff --git a/app/Classes/Modules/Transports/Standards/Validators/TransportValidation.php b/app/Classes/Modules/Transports/Standards/Validators/TransportValidation.php index 83737634..0a41982b 100644 --- a/app/Classes/Modules/Transports/Standards/Validators/TransportValidation.php +++ b/app/Classes/Modules/Transports/Standards/Validators/TransportValidation.php @@ -16,9 +16,12 @@ class TransportValidation extends AbstractValidation */ protected function data($object): array { return [ - 'street_one' => $object->getStreetOne(), - 'street_two' => $object->getStreetTwo(), - 'district_id' => $object->getDistrictId() + 'type' => $object->getType(), + 'courier' => $object->getCourier(), + 'tracking_number' => $object->getTrackingNumber() + 'dispacth_date' => $object->getDispatchDate() + 'drop_date' => $object->getDropDate() + 'status' => $object->getStatus() ]; } @@ -27,8 +30,12 @@ class TransportValidation extends AbstractValidation */ protected function rules(): array { return [ - 'street_one' => 'required', - 'district_id' => 'required', + 'type' => 'required', + 'courier' => 'required', + 'tracking_number' => 'required', + 'dispacth_date' => '', + 'drop_date' => '', + 'status' => '', ]; } diff --git a/app/Models/ContainerPackingList.php b/app/Models/ContainerPackingList.php index e305f3f8..228c6fce 100644 --- a/app/Models/ContainerPackingList.php +++ b/app/Models/ContainerPackingList.php @@ -14,4 +14,12 @@ class ContainerPackingList extends AbstractModel { return $this->hasMany(PackingList::class, 'packing_list_id', 'id'); } + + /** + * @return MorphMany + */ + public function transports(): morphMany + { + return $this->morphMany(Transport::class, 'owner'); + } } diff --git a/app/Models/TransportArrangement.php b/app/Models/TransportArrangement.php index cdf92994..3bb122d1 100644 --- a/app/Models/TransportArrangement.php +++ b/app/Models/TransportArrangement.php @@ -2,10 +2,20 @@ namespace App\Models; -use Illuminate\Database\Eloquent\Factories\HasFactory; -use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\Relations\MorphTo; +use Illuminate\Database\Eloquent\SoftDeletes; -class TransportArrangement extends Model +class Transport extends AbstractModel { - use HasFactory; + use SoftDeletes; + + protected $table = 'schedules'; + + /** + * @return MorphMany + */ + public function schedule(): morphMany + { + return $this->morphMany(Schdule::class, 'owner'); + } } diff --git a/resources/views/swagger/json.blade.php b/resources/views/swagger/json.blade.php index 36b0abd8..4dbc8fd3 100644 --- a/resources/views/swagger/json.blade.php +++ b/resources/views/swagger/json.blade.php @@ -1,944 +1,2746 @@ { -"swagger": "2.0", -"info": { -"description": "Shipping Portal to manage parcel", -"version": "1.0.0", -"title": "Shipping Portal" -}, -"host": "{{request()->getHttpHost()}}", -"basePath": "/api/v1", -"tags": [ -{ -"name": "Account", -"description": "Endpoints related to user module, e.g. login, register." -}, -{ -"name": "Address", -"description": "Endpoints related to address module, e.g. create, district." -}, -{ -"name": "Company", -"description": "Endpoints related to company module." -}, -{ -"name": "Order", -"description": "Endpoints related to order module." -}, -{ -"name": "Flow - Registration", -"description": "Endpoints related to registration flow." -} -], -"schemes": [ -"http", -"https" -], -"paths": { -"/order/create": { -"post": { -"tags": [ -"Order" -], -"produces": [ -"application/json" -], -"operationId": "createOrder", -"summary": "Create order", -"description": "", -"parameters": [ -{ -"name": "company_module_id", -"in": "query", -"description": "Company Module ID", -"required": true, -"type": "integer" -}, -{ -"name": "reference", -"in": "query", -"description": "Internal reference id", -"required": true, -"type": "string" -}, -{ -"name": "reference_contract", -"in": "query", -"description": "Unity contract reference id", -"required": true, -"type": "string" -} -], -"responses": { -"200": { -"description": "successful operation", -"headers": { -"X-Expires-After": { -"type": "string", -"format": "date-time", -"description": "date in UTC when token expires" -}, -"X-Rate-Limit": { -"type": "integer", -"format": "int32", -"description": "calls per hour allowed by the user" -} -}, -"schema": { -"type": "string" -} -}, -"422": { -"description": "Invalid input supplied" -} -} -} -}, -"/order/confirm/{id}": { -"put": { -"tags": [ -"Order" -], -"produces": [ -"application/json" -], -"operationId": "confirmOrder", -"summary": "Admin confirms order", -"description": "", -"parameters": [ -{ -"name": "id", -"in": "path", -"description": "Order ID", -"required": true, -"type": "integer" -} -], -"responses": { -"200": { -"description": "successful operation", -"headers": { -"X-Expires-After": { -"type": "string", -"format": "date-time", -"description": "date in UTC when token expires" -}, -"X-Rate-Limit": { -"type": "integer", -"format": "int32", -"description": "calls per hour allowed by the user" -} -}, -"schema": { -"type": "string" -} -}, -"422": { -"description": "Invalid input supplied" -} -} -} -}, -"/order/{id}/step/completes": { -"post": { -"tags": [ -"Order" -], -"produces": [ -"application/json" -], -"operationId": "createOrder", -"summary": "Completes order step", -"description": "", -"parameters": [ -{ -"name": "id", -"in": "path", -"description": "Order Id", -"required": true, -"type": "integer" -}, -{ -"name": "reference", -"in": "query", -"description": "Order step reference", -"required": true, -"type": "string" -} -], -"responses": { -"200": { -"description": "successful operation", -"headers": { -"X-Expires-After": { -"type": "string", -"format": "date-time", -"description": "date in UTC when token expires" -}, -"X-Rate-Limit": { -"type": "integer", -"format": "int32", -"description": "calls per hour allowed by the user" -} -}, -"schema": { -"type": "string" -} -}, -"422": { -"description": "Invalid input supplied" -} -} -} -}, -"/address/create": { -"post": { -"tags": [ -"Address" -], -"produces": [ -"application/json" -], -"operationId": "createAddress", -"summary": "Create address", -"description": "", -"parameters": [ -{ -"name": "district_id", -"in": "query", -"description": "District id", -"required": true, -"type": "integer" -}, -{ -"name": "street_one", -"in": "query", -"description": "Address line 1", -"required": true, -"type": "string" -}, -{ -"name": "street_two", -"in": "query", -"description": "Address line 2", -"required": true, -"type": "string" -}, -{ -"name": "post_code", -"in": "query", -"description": "Postcode of the address", -"required": true, -"type": "string" -} -], -"responses": { -"200": { -"description": "successful operation", -"headers": { -"X-Expires-After": { -"type": "string", -"format": "date-time", -"description": "date in UTC when token expires" -}, -"X-Rate-Limit": { -"type": "integer", -"format": "int32", -"description": "calls per hour allowed by the user" -} -}, -"schema": { -"type": "string" -} -}, -"422": { -"description": "Invalid input supplied" -} -} -} -}, -"/address/delete/{id}": { -"delete": { -"tags": [ -"Address" -], -"produces": [ -"application/json" -], -"operationId": "deleteAddress", -"summary": "Delete address", -"description": "", -"parameters": [ -{ -"name": "id", -"in": "path", -"description": "District id", -"required": true, -"type": "string" -} -], -"responses": { -"200": { -"description": "successful operation", -"headers": { -"X-Expires-After": { -"type": "string", -"format": "date-time", -"description": "date in UTC when token expires" -}, -"X-Rate-Limit": { -"type": "integer", -"format": "int32", -"description": "calls per hour allowed by the user" -} -}, -"schema": { -"type": "string" -} -}, -"422": { -"description": "Invalid input supplied" -} -} -} -}, -"/address/district/list": { -"get": { -"tags": [ -"Address" -], -"produces": [ -"application/json" -], -"operationId": "listDistrictAddress", -"summary": "List districts", -"description": "", -"parameters": [ -{ -"name": "filter", -"in": "query", -"description": "Filters", -"required": false, -"type": "array", -"items": { -"type": "string" -} -} -], -"responses": { -"200": { -"description": "successful operation", -"headers": { -"X-Expires-After": { -"type": "string", -"format": "date-time", -"description": "date in UTC when token expires" -}, -"X-Rate-Limit": { -"type": "integer", -"format": "int32", -"description": "calls per hour allowed by the user" -} -}, -"schema": { -"type": "string" -} -}, -"422": { -"description": "Invalid input supplied" -} -} -} -}, -"/address/list": { -"get": { -"tags": [ -"Address" -], -"produces": [ -"application/json" -], -"operationId": "listAddress", -"summary": "List addresses of logged in user", -"description": "", -"parameters": [ -{ -"name": "filter", -"in": "query", -"description": "Filters", -"required": false, -"type": "array", -"items": { -"type": "string" -} -} -], -"responses": { -"200": { -"description": "successful operation", -"headers": { -"X-Expires-After": { -"type": "string", -"format": "date-time", -"description": "date in UTC when token expires" -}, -"X-Rate-Limit": { -"type": "integer", -"format": "int32", -"description": "calls per hour allowed by the user" -} -}, -"schema": { -"type": "string" -} -}, -"422": { -"description": "Invalid input supplied" -} -} -} -}, -"/address/{id}/show": { -"get": { -"tags": [ -"Address" -], -"produces": [ -"application/json" -], -"operationId": "showAddress", -"summary": "List addresses of logged in user", -"description": "", -"parameters": [ -{ -"name": "id", -"in": "path", -"description": "Address id", -"required": true, -"type": "integer" -} -], -"responses": { -"200": { -"description": "successful operation", -"headers": { -"X-Expires-After": { -"type": "string", -"format": "date-time", -"description": "date in UTC when token expires" -}, -"X-Rate-Limit": { -"type": "integer", -"format": "int32", -"description": "calls per hour allowed by the user" -} -}, -"schema": { -"type": "string" -} -}, -"422": { -"description": "Invalid input supplied" -} -} -} -}, -"/address/{id}/default": { -"put": { -"tags": [ -"Address" -], -"produces": [ -"application/json" -], -"operationId": "setDefaultAddress", -"summary": "Set default address", -"description": "", -"parameters": [ -{ -"name": "id", -"in": "path", -"description": "Address id", -"required": true, -"type": "integer" -}, -{ -"name": "district_id", -"in": "query", -"description": "District id", -"required": true, -"type": "integer" -}, -{ -"name": "street_one", -"in": "query", -"description": "Address line 1", -"required": true, -"type": "string" -}, -{ -"name": "street_two", -"in": "query", -"description": "Address line 2", -"required": true, -"type": "string" -}, -{ -"name": "post_code", -"in": "query", -"description": "Postcode of the address", -"required": true, -"type": "string" -} -], -"responses": { -"200": { -"description": "successful operation", -"headers": { -"X-Expires-After": { -"type": "string", -"format": "date-time", -"description": "date in UTC when token expires" -}, -"X-Rate-Limit": { -"type": "integer", -"format": "int32", -"description": "calls per hour allowed by the user" -} -}, -"schema": { -"type": "string" -} -}, -"422": { -"description": "Invalid input supplied" -} -} -} -}, -"/address/update/{id}": { -"put": { -"tags": [ -"Address" -], -"produces": [ -"application/json" -], -"operationId": "setDefaultAddress", -"summary": "Set default address", -"description": "", -"parameters": [ -{ -"name": "id", -"in": "path", -"description": "Address id", -"required": true, -"type": "integer" -} -], -"responses": { -"200": { -"description": "successful operation", -"headers": { -"X-Expires-After": { -"type": "string", -"format": "date-time", -"description": "date in UTC when token expires" -}, -"X-Rate-Limit": { -"type": "integer", -"format": "int32", -"description": "calls per hour allowed by the user" -} -}, -"schema": { -"type": "string" -} -}, -"422": { -"description": "Invalid input supplied" -} -} -} -}, -"/account/authentication/login/check_email": { -"post": { -"tags": [ -"Account", -"Flow - Registration" -], -"summary": "Check if email registered", -"description": "", -"operationId": "userList", -"produces": [ -"application/json", -"application/xml" -], -"parameters": [ -{ -"name": "email", -"in": "query", -"description": "email", -"required": true, -"type": "string" -} -], -"responses": { -"default": { -"description": "successful operation" -} -} -} -}, -"/account/registration/registration": { -"post": { -"tags": [ -"Account", -"Flow - Registration" -], -"produces": [ -"application/json" -], -"summary": "Register user into the system", -"description": "", -"parameters": [ -{ -"name": "name", -"in": "query", -"description": "The name of user", -"required": true, -"type": "string" -}, -{ -"name": "email", -"in": "query", -"description": "The email for login", -"required": true, -"type": "string", -"format": "email" -}, -{ -"name": "password", -"in": "query", -"description": "The password for login", -"required": true, -"type": "string", -"format": "password" -}, -{ -"name": "password_confirmation", -"in": "query", -"description": "The confirmation password for login", -"required": true, -"type": "string", -"format": "password" -}, -{ -"name": "type", -"in": "query", -"description": "Company Type - PERSONAL_BUSINESS:0 , COMPANY_BUSINESS:1", -"required": true, -"type": "integer" -}, -{ -"name": "phone", -"in": "query", -"description": "Contact phone number", -"required": true, -"type": "string" -}, -{ -"name": "contact_email", -"in": "query", -"description": "Contact email", -"required": true, -"type": "string" -}, -{ -"name": "company_name", -"in": "query", -"description": "The company name - if not defined , name of user will save as the company name", -"required": false, -"type": "string" -}, -{ -"name": "business_type", -"in": "query", -"description": "Business Type - FREIGHT_FORWARDER:1, IMPORTER:2, CURRENCY_VENDOR:3, WAREHOUSE:4", -"required": false, -"default": 2, -"type": "integer" -}, -{ -"name": "wechat_id", -"in": "query", -"description": "Contact Wechat id", -"required": false, -"type": "string" -}, -{ -"name": "files[0]", -"in": "query", -"description": "File need to convert to base64 example : 'data:application/pdf;base64,{Base64}';", -"required": true, -"type": "string" -}, -{ -"name": "identification_no", -"in": "query", -"description": "Personal identification no or company registration no", -"required": true, -"type": "string" -} -], -"responses": { -"200": { -"description": "successful operation", -"headers": { -"X-Expires-After": { -"type": "string", -"format": "date-time", -"description": "date in UTC when token expires" -}, -"X-Rate-Limit": { -"type": "integer", -"format": "int32", -"description": "calls per hour allowed by the user" -} -}, -"schema": { -"type": "string" -} -}, -"400": { -"description": "Invalid username/password supplied" -} -} -} -}, -"/account/authentication/login/attempt": { -"post": { -"tags": [ -"Account" -], -"produces": [ -"application/json" -], -"summary": "Logs user into the system", -"operationId": "aaa", -"description": "", -"parameters": [ -{ -"name": "email", -"in": "query", -"description": "The user name for login", -"required": true, -"type": "string" -}, -{ -"name": "password", -"in": "query", -"description": "The password for login in clear text", -"required": true, -"type": "string" -} -], -"responses": { -"200": { -"description": "successful operation", -"headers": { -"X-Expires-After": { -"type": "string", -"format": "date-time", -"description": "date in UTC when token expires" -}, -"X-Rate-Limit": { -"type": "integer", -"format": "int32", -"description": "calls per hour allowed by the user" -} -}, -"schema": { -"type": "string" -} -}, -"400": { -"description": "Invalid username/password supplied" -} -} -} -}, -"/account/authentication/logout": { -"get": { -"tags": [ -"Account" -], -"summary": "Logs out current logged in user session", -"description": "", -"operationId": "logoutUser", -"produces": [ -"application/json", -"application/xml" -], -"parameters": [], -"responses": { -"default": { -"description": "successful operation" -} -} -} -}, -"/account/user/list": { -"get": { -"tags": [ -"Account" -], -"summary": "Logs out current logged in user session", -"description": "", -"operationId": "userList", -"produces": [ -"application/json", -"application/xml" -], -"parameters": [], -"responses": { -"default": { -"description": "successful operation" -} -} -} -}, -"/company/list": { -"get": { -"tags": [ -"Company" -], -"summary": "List of Companies", -"description": "example filters={\"WithCompanyModuleType\":4,\"order_by\":{\"column\":\"id\",\"DESC\":true}} | to get list of company with company_module.Type(business type) = 4(Warehouse)", -"operationId": "companyList", -"produces": [ -"application/json", -"application/xml" -], -"parameters": [ -{ -"name": "filters", -"in": "query", -"description": "Eloquent Filter", -"required": false, -"type": "array", -"items": { -"type": "string" -} -} -], -"responses": { -"default": { -"description": "successful operation" -} -} -} -}, -"/company/create": { -"post": { -"tags": [ -"Company" -], -"summary": "Create company", -"description": "", -"operationId": "companyCreate", -"produces": [ -"application/json", -"application/xml" -], -"parameters": [ -{ -"name": "type", -"in": "query", -"description": "Company Type - PERSONAL_BUSINESS:0 , COMPANY_BUSINESS:1", -"required": true, -"type": "integer", -"enum": [ -0, -1 -] -}, -{ -"name": "business_type", -"in": "query", -"description": "Business Type - FREIGHT_FORWARDER:1, IMPORTER:2, CURRENCY_VENDOR:3, WAREHOUSE:4", -"required": true, -"type": "integer", -"enum": [ -1, -2, -3, -4 -] -}, -{ -"name": "name", -"in": "query", -"description": "Fill in name if type = 0", -"required": false, -"type": "string" -}, -{ -"name": "name", -"in": "query", -"description": "Fill in name if type = 0", -"required": false, -"type": "string" -}, -{ -"name": "company_name", -"in": "query", -"description": "Fill in company_name if type = 1", -"required": false, -"type": "string" -} -], -"responses": { -"default": { -"description": "successful operation" -} -} -} -} -}, -"securityDefinitions": { -"Authorization": { -"type": "apiKey", -"name": "api_key", -"in": "header" -}, -"petstore_auth": { -"type": "oauth2", -"authorizationUrl": "https://petstore.swagger.io/oauth/authorize", -"flow": "implicit", -"scopes": { -"read:pets": "read your pets", -"write:pets": "modify pets in your account" -} -} -}, -"definitions": { -"ApiResponse": { -"type": "object", -"properties": { -"code": { -"type": "integer", -"format": "int32" -}, -"title": { -"type": "string" -}, -"message": { -"type": "string" -}, -"payload": { -"type": "object" -} -} -} -} + "swagger": "2.0", + "info": { + "description": "Shipping Portal to manage parcel", + "version": "1.0.0", + "title": "Shipping Portal" + }, + "host": "{{request()->getHttpHost()}}", + "basePath": "/api/v1", + "tags": [ + { + "name": "Account", + "description": "Endpoints related to user module, e.g. login, register." + }, + { + "name": "Address", + "description": "Endpoints related to address module, e.g. create, district." + }, + { + "name": "Bank", + "description": "Endpoints related to bank module." + }, + { + "name": "Company", + "description": "Endpoints related to company module." + }, + { + "name": "Order", + "description": "Endpoints related to order module." + }, + { + "name": "Package", + "description": "Endpoints related to package module." + }, + { + "name": "Packing", + "description": "Endpoints related to packing module." + }, + { + "name": "Transport", + "description": "Endpoints related to transport module." + }, + { + "name": "Schedule", + "description": "Endpoints related to schedule module." + }, + { + "name": "Remark", + "description": "Endpoints related to remark module." + }, + { + "name": "Flow - Registration", + "description": "Endpoints related to registration flow." + } + ], + "schemes": [ + "http", + "https" + ], + "paths": { + "/packing_list/create": { + "post": { + "tags": [ + "Packing" + ], + "produces": [ + "application/json" + ], + "operationId": "createPacking", + "summary": "Create packing", + "description": "", + "parameters": [ + { + "name": "type", + "in": "query", + "description": "Transport type", + "required": true, + "type": "integer" + }, + { + "name": "courier", + "in": "query", + "description": "Courier Provider Name", + "required": true, + "type": "string" + }, + { + "name": "tracking_number", + "in": "query", + "description": "Tracking No.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "X-Expires-After": { + "type": "string", + "format": "date-time", + "description": "date in UTC when token expires" + }, + "X-Rate-Limit": { + "type": "integer", + "format": "int32", + "description": "calls per hour allowed by the user" + } + }, + "schema": { + "type": "string" + } + }, + "422": { + "description": "Invalid input supplied" + } + } + } + }, + "/packing_list/list": { + "get": { + "tags": [ + "Packing" + ], + "produces": [ + "application/json" + ], + "operationId": "listPacking", + "summary": "List packing", + "description": "", + "parameters": [ + { + "name": "filter", + "in": "query", + "description": "Filters", + "required": false, + "type": "array", + "items": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "X-Expires-After": { + "type": "string", + "format": "date-time", + "description": "date in UTC when token expires" + }, + "X-Rate-Limit": { + "type": "integer", + "format": "int32", + "description": "calls per hour allowed by the user" + } + }, + "schema": { + "type": "string" + } + }, + "422": { + "description": "Invalid input supplied" + } + } + } + }, + "/packing_list/{id}/show": { + "get": { + "tags": [ + "Packing" + ], + "produces": [ + "application/json" + ], + "operationId": "showPacking", + "summary": "Show packing", + "description": "", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Package id", + "required": true, + "type": "integer" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "X-Expires-After": { + "type": "string", + "format": "date-time", + "description": "date in UTC when token expires" + }, + "X-Rate-Limit": { + "type": "integer", + "format": "int32", + "description": "calls per hour allowed by the user" + } + }, + "schema": { + "type": "string" + } + }, + "422": { + "description": "Invalid input supplied" + } + } + } + }, + "/packing_list/update": { + "put": { + "tags": [ + "Packing" + ], + "produces": [ + "application/json" + ], + "operationId": "updatePacking", + "summary": "Update packing", + "description": "", + "parameters": [ + { + "name": "id", + "in": "query", + "description": "transport id", + "required": true, + "type": "integer" + }, + { + "name": "commenter_id", + "in": "query", + "description": "Commenter id", + "required": true, + "type": "integer" + }, + { + "name": "comment", + "in": "query", + "description": "Comment", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "X-Expires-After": { + "type": "string", + "format": "date-time", + "description": "date in UTC when token expires" + }, + "X-Rate-Limit": { + "type": "integer", + "format": "int32", + "description": "calls per hour allowed by the user" + } + }, + "schema": { + "type": "string" + } + }, + "422": { + "description": "Invalid input supplied" + } + } + } + }, + "/packing_list/delete/{id}": { + "delete": { + "tags": [ + "Packing" + ], + "produces": [ + "application/json" + ], + "operationId": "deletePacking", + "summary": "Delete packing", + "description": "", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Package id", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "X-Expires-After": { + "type": "string", + "format": "date-time", + "description": "date in UTC when token expires" + }, + "X-Rate-Limit": { + "type": "integer", + "format": "int32", + "description": "calls per hour allowed by the user" + } + }, + "schema": { + "type": "string" + } + }, + "422": { + "description": "Invalid input supplied" + } + } + } + }, + "/bank/create": { + "post": { + "tags": [ + "Bank" + ], + "produces": [ + "application/json" + ], + "operationId": "createBank", + "summary": "Create bank", + "description": "", + "parameters": [ + { + "name": "type", + "in": "query", + "description": "Transport type", + "required": true, + "type": "integer" + }, + { + "name": "courier", + "in": "query", + "description": "Courier Provider Name", + "required": true, + "type": "string" + }, + { + "name": "tracking_number", + "in": "query", + "description": "Tracking No.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "X-Expires-After": { + "type": "string", + "format": "date-time", + "description": "date in UTC when token expires" + }, + "X-Rate-Limit": { + "type": "integer", + "format": "int32", + "description": "calls per hour allowed by the user" + } + }, + "schema": { + "type": "string" + } + }, + "422": { + "description": "Invalid input supplied" + } + } + } + }, + "/bank/list": { + "get": { + "tags": [ + "Bank" + ], + "produces": [ + "application/json" + ], + "operationId": "listBank", + "summary": "List bank account", + "description": "", + "parameters": [ + { + "name": "filter", + "in": "query", + "description": "Filters", + "required": false, + "type": "array", + "items": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "X-Expires-After": { + "type": "string", + "format": "date-time", + "description": "date in UTC when token expires" + }, + "X-Rate-Limit": { + "type": "integer", + "format": "int32", + "description": "calls per hour allowed by the user" + } + }, + "schema": { + "type": "string" + } + }, + "422": { + "description": "Invalid input supplied" + } + } + } + }, + "/bank/{id}/show": { + "get": { + "tags": [ + "Bank" + ], + "produces": [ + "application/json" + ], + "operationId": "showBank", + "summary": "Show bank account", + "description": "", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Package id", + "required": true, + "type": "integer" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "X-Expires-After": { + "type": "string", + "format": "date-time", + "description": "date in UTC when token expires" + }, + "X-Rate-Limit": { + "type": "integer", + "format": "int32", + "description": "calls per hour allowed by the user" + } + }, + "schema": { + "type": "string" + } + }, + "422": { + "description": "Invalid input supplied" + } + } + } + }, + "/bank/update": { + "put": { + "tags": [ + "Bank" + ], + "produces": [ + "application/json" + ], + "operationId": "updateBank", + "summary": "Update bank", + "description": "", + "parameters": [ + { + "name": "id", + "in": "query", + "description": "transport id", + "required": true, + "type": "integer" + }, + { + "name": "commenter_id", + "in": "query", + "description": "Commenter id", + "required": true, + "type": "integer" + }, + { + "name": "comment", + "in": "query", + "description": "Comment", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "X-Expires-After": { + "type": "string", + "format": "date-time", + "description": "date in UTC when token expires" + }, + "X-Rate-Limit": { + "type": "integer", + "format": "int32", + "description": "calls per hour allowed by the user" + } + }, + "schema": { + "type": "string" + } + }, + "422": { + "description": "Invalid input supplied" + } + } + } + }, + "/bank/delete/{id}": { + "delete": { + "tags": [ + "Bank" + ], + "produces": [ + "application/json" + ], + "operationId": "deleteBank", + "summary": "Delete bank", + "description": "", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Bank id", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "X-Expires-After": { + "type": "string", + "format": "date-time", + "description": "date in UTC when token expires" + }, + "X-Rate-Limit": { + "type": "integer", + "format": "int32", + "description": "calls per hour allowed by the user" + } + }, + "schema": { + "type": "string" + } + }, + "422": { + "description": "Invalid input supplied" + } + } + } + }, + "/package/create": { + "post": { + "tags": [ + "Package" + ], + "produces": [ + "application/json" + ], + "operationId": "createPackage", + "summary": "Create package", + "description": "", + "parameters": [ + { + "name": "type", + "in": "query", + "description": "Transport type", + "required": true, + "type": "integer" + }, + { + "name": "courier", + "in": "query", + "description": "Courier Provider Name", + "required": true, + "type": "string" + }, + { + "name": "tracking_number", + "in": "query", + "description": "Tracking No.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "X-Expires-After": { + "type": "string", + "format": "date-time", + "description": "date in UTC when token expires" + }, + "X-Rate-Limit": { + "type": "integer", + "format": "int32", + "description": "calls per hour allowed by the user" + } + }, + "schema": { + "type": "string" + } + }, + "422": { + "description": "Invalid input supplied" + } + } + } + }, + "/package/list": { + "get": { + "tags": [ + "Package" + ], + "produces": [ + "application/json" + ], + "operationId": "listPackage", + "summary": "List package", + "description": "", + "parameters": [ + { + "name": "filter", + "in": "query", + "description": "Filters", + "required": false, + "type": "array", + "items": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "X-Expires-After": { + "type": "string", + "format": "date-time", + "description": "date in UTC when token expires" + }, + "X-Rate-Limit": { + "type": "integer", + "format": "int32", + "description": "calls per hour allowed by the user" + } + }, + "schema": { + "type": "string" + } + }, + "422": { + "description": "Invalid input supplied" + } + } + } + }, + "/package/{id}/show": { + "get": { + "tags": [ + "Package" + ], + "produces": [ + "application/json" + ], + "operationId": "showPackage", + "summary": "Show package", + "description": "", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Package id", + "required": true, + "type": "integer" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "X-Expires-After": { + "type": "string", + "format": "date-time", + "description": "date in UTC when token expires" + }, + "X-Rate-Limit": { + "type": "integer", + "format": "int32", + "description": "calls per hour allowed by the user" + } + }, + "schema": { + "type": "string" + } + }, + "422": { + "description": "Invalid input supplied" + } + } + } + }, + "/package/update": { + "put": { + "tags": [ + "Package" + ], + "produces": [ + "application/json" + ], + "operationId": "updatePackage", + "summary": "Update package", + "description": "", + "parameters": [ + { + "name": "id", + "in": "query", + "description": "transport id", + "required": true, + "type": "integer" + }, + { + "name": "commenter_id", + "in": "query", + "description": "Commenter id", + "required": true, + "type": "integer" + }, + { + "name": "comment", + "in": "query", + "description": "Comment", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "X-Expires-After": { + "type": "string", + "format": "date-time", + "description": "date in UTC when token expires" + }, + "X-Rate-Limit": { + "type": "integer", + "format": "int32", + "description": "calls per hour allowed by the user" + } + }, + "schema": { + "type": "string" + } + }, + "422": { + "description": "Invalid input supplied" + } + } + } + }, + "/package/delete/{id}": { + "delete": { + "tags": [ + "Package" + ], + "produces": [ + "application/json" + ], + "operationId": "deletePackage", + "summary": "Delete package", + "description": "", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Package id", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "X-Expires-After": { + "type": "string", + "format": "date-time", + "description": "date in UTC when token expires" + }, + "X-Rate-Limit": { + "type": "integer", + "format": "int32", + "description": "calls per hour allowed by the user" + } + }, + "schema": { + "type": "string" + } + }, + "422": { + "description": "Invalid input supplied" + } + } + } + }, + "/package/item/create": { + "post": { + "tags": [ + "Package" + ], + "produces": [ + "application/json" + ], + "operationId": "createPackageItem", + "summary": "Create package item", + "description": "", + "parameters": [ + { + "name": "type", + "in": "query", + "description": "Transport type", + "required": true, + "type": "integer" + }, + { + "name": "courier", + "in": "query", + "description": "Courier Provider Name", + "required": true, + "type": "string" + }, + { + "name": "tracking_number", + "in": "query", + "description": "Tracking No.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "X-Expires-After": { + "type": "string", + "format": "date-time", + "description": "date in UTC when token expires" + }, + "X-Rate-Limit": { + "type": "integer", + "format": "int32", + "description": "calls per hour allowed by the user" + } + }, + "schema": { + "type": "string" + } + }, + "422": { + "description": "Invalid input supplied" + } + } + } + }, + "/package/item/list": { + "get": { + "tags": [ + "Package" + ], + "produces": [ + "application/json" + ], + "operationId": "listPackageItem", + "summary": "List package item", + "description": "", + "parameters": [ + { + "name": "filter", + "in": "query", + "description": "Filters", + "required": false, + "type": "array", + "items": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "X-Expires-After": { + "type": "string", + "format": "date-time", + "description": "date in UTC when token expires" + }, + "X-Rate-Limit": { + "type": "integer", + "format": "int32", + "description": "calls per hour allowed by the user" + } + }, + "schema": { + "type": "string" + } + }, + "422": { + "description": "Invalid input supplied" + } + } + } + }, + "/package/item/{id}/show": { + "get": { + "tags": [ + "Package" + ], + "produces": [ + "application/json" + ], + "operationId": "showPackageItem", + "summary": "Show package item", + "description": "", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Package item id", + "required": true, + "type": "integer" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "X-Expires-After": { + "type": "string", + "format": "date-time", + "description": "date in UTC when token expires" + }, + "X-Rate-Limit": { + "type": "integer", + "format": "int32", + "description": "calls per hour allowed by the user" + } + }, + "schema": { + "type": "string" + } + }, + "422": { + "description": "Invalid input supplied" + } + } + } + }, + "/package/item/update": { + "put": { + "tags": [ + "Package" + ], + "produces": [ + "application/json" + ], + "operationId": "updatePackageItem", + "summary": "Update package item", + "description": "", + "parameters": [ + { + "name": "id", + "in": "query", + "description": "transport id", + "required": true, + "type": "integer" + }, + { + "name": "commenter_id", + "in": "query", + "description": "Commenter id", + "required": true, + "type": "integer" + }, + { + "name": "comment", + "in": "query", + "description": "Comment", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "X-Expires-After": { + "type": "string", + "format": "date-time", + "description": "date in UTC when token expires" + }, + "X-Rate-Limit": { + "type": "integer", + "format": "int32", + "description": "calls per hour allowed by the user" + } + }, + "schema": { + "type": "string" + } + }, + "422": { + "description": "Invalid input supplied" + } + } + } + }, + "/package/item/delete/{id}": { + "delete": { + "tags": [ + "Package" + ], + "produces": [ + "application/json" + ], + "operationId": "deletePackageItem", + "summary": "Delete package item", + "description": "", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Package item id", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "X-Expires-After": { + "type": "string", + "format": "date-time", + "description": "date in UTC when token expires" + }, + "X-Rate-Limit": { + "type": "integer", + "format": "int32", + "description": "calls per hour allowed by the user" + } + }, + "schema": { + "type": "string" + } + }, + "422": { + "description": "Invalid input supplied" + } + } + } + }, + "/transport/create": { + "post": { + "tags": [ + "Transport" + ], + "produces": [ + "application/json" + ], + "operationId": "createTransport", + "summary": "Create transport", + "description": "", + "parameters": [ + { + "name": "type", + "in": "query", + "description": "Transport type", + "required": true, + "type": "integer" + }, + { + "name": "courier", + "in": "query", + "description": "Courier Provider Name", + "required": true, + "type": "string" + }, + { + "name": "tracking_number", + "in": "query", + "description": "Tracking No.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "X-Expires-After": { + "type": "string", + "format": "date-time", + "description": "date in UTC when token expires" + }, + "X-Rate-Limit": { + "type": "integer", + "format": "int32", + "description": "calls per hour allowed by the user" + } + }, + "schema": { + "type": "string" + } + }, + "422": { + "description": "Invalid input supplied" + } + } + } + }, + "/transport/list": { + "get": { + "tags": [ + "Transport" + ], + "produces": [ + "application/json" + ], + "operationId": "listTransport", + "summary": "List transport", + "description": "", + "parameters": [ + { + "name": "filter", + "in": "query", + "description": "Filters", + "required": false, + "type": "array", + "items": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "X-Expires-After": { + "type": "string", + "format": "date-time", + "description": "date in UTC when token expires" + }, + "X-Rate-Limit": { + "type": "integer", + "format": "int32", + "description": "calls per hour allowed by the user" + } + }, + "schema": { + "type": "string" + } + }, + "422": { + "description": "Invalid input supplied" + } + } + } + }, + "/transport/{id}/show": { + "get": { + "tags": [ + "Transport" + ], + "produces": [ + "application/json" + ], + "operationId": "showTransport", + "summary": "Show transport", + "description": "", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Transport id", + "required": true, + "type": "integer" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "X-Expires-After": { + "type": "string", + "format": "date-time", + "description": "date in UTC when token expires" + }, + "X-Rate-Limit": { + "type": "integer", + "format": "int32", + "description": "calls per hour allowed by the user" + } + }, + "schema": { + "type": "string" + } + }, + "422": { + "description": "Invalid input supplied" + } + } + } + }, + "/transport/update": { + "put": { + "tags": [ + "Transport" + ], + "produces": [ + "application/json" + ], + "operationId": "updateTransport", + "summary": "Update transport", + "description": "", + "parameters": [ + { + "name": "id", + "in": "query", + "description": "transport id", + "required": true, + "type": "integer" + }, + { + "name": "commenter_id", + "in": "query", + "description": "Commenter id", + "required": true, + "type": "integer" + }, + { + "name": "comment", + "in": "query", + "description": "Comment", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "X-Expires-After": { + "type": "string", + "format": "date-time", + "description": "date in UTC when token expires" + }, + "X-Rate-Limit": { + "type": "integer", + "format": "int32", + "description": "calls per hour allowed by the user" + } + }, + "schema": { + "type": "string" + } + }, + "422": { + "description": "Invalid input supplied" + } + } + } + }, + "/transport/delete/{id}": { + "delete": { + "tags": [ + "Transport" + ], + "produces": [ + "application/json" + ], + "operationId": "deleteTransport", + "summary": "Delete transport", + "description": "", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Transport id", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "X-Expires-After": { + "type": "string", + "format": "date-time", + "description": "date in UTC when token expires" + }, + "X-Rate-Limit": { + "type": "integer", + "format": "int32", + "description": "calls per hour allowed by the user" + } + }, + "schema": { + "type": "string" + } + }, + "422": { + "description": "Invalid input supplied" + } + } + } + }, + "/schedule/create": { + "post": { + "tags": [ + "Schedule" + ], + "produces": [ + "application/json" + ], + "operationId": "createSchedule", + "summary": "Create schedule", + "description": "", + "parameters": [ + { + "name": "transport_id", + "in": "query", + "description": "Transport arrangment id", + "required": true, + "type": "integer" + }, + { + "name": "etd", + "in": "query", + "description": "Estimate time deliver", + "required": true, + "type": "string" + }, + { + "name": "eta", + "in": "query", + "description": "Estimate time arrival", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "X-Expires-After": { + "type": "string", + "format": "date-time", + "description": "date in UTC when token expires" + }, + "X-Rate-Limit": { + "type": "integer", + "format": "int32", + "description": "calls per hour allowed by the user" + } + }, + "schema": { + "type": "string" + } + }, + "422": { + "description": "Invalid input supplied" + } + } + } + }, + "/schedule/list": { + "get": { + "tags": [ + "Schedule" + ], + "produces": [ + "application/json" + ], + "operationId": "listSchedule", + "summary": "List schedule", + "description": "", + "parameters": [ + { + "name": "filter", + "in": "query", + "description": "Filters", + "required": false, + "type": "array", + "items": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "X-Expires-After": { + "type": "string", + "format": "date-time", + "description": "date in UTC when token expires" + }, + "X-Rate-Limit": { + "type": "integer", + "format": "int32", + "description": "calls per hour allowed by the user" + } + }, + "schema": { + "type": "string" + } + }, + "422": { + "description": "Invalid input supplied" + } + } + } + }, + "/schedule/{id}/show": { + "get": { + "tags": [ + "Schedule" + ], + "produces": [ + "application/json" + ], + "operationId": "showSchedule", + "summary": "Show schedules", + "description": "", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Schedule id", + "required": true, + "type": "integer" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "X-Expires-After": { + "type": "string", + "format": "date-time", + "description": "date in UTC when token expires" + }, + "X-Rate-Limit": { + "type": "integer", + "format": "int32", + "description": "calls per hour allowed by the user" + } + }, + "schema": { + "type": "string" + } + }, + "422": { + "description": "Invalid input supplied" + } + } + } + }, + "/schedule/update": { + "put": { + "tags": [ + "Schedule" + ], + "produces": [ + "application/json" + ], + "operationId": "updateSchedule", + "summary": "Update schedule", + "description": "", + "parameters": [ + { + "name": "schedule_id", + "in": "query", + "description": "Schedule id", + "required": true, + "type": "integer" + }, + { + "name": "etd", + "in": "query", + "description": "Estimate time deliver", + "required": true, + "type": "string" + }, + { + "name": "eta", + "in": "query", + "description": "Estimate time arrival", + "required": true, + "type": "string" + }, + { + "name": "status", + "in": "query", + "description": "Status", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "X-Expires-After": { + "type": "string", + "format": "date-time", + "description": "date in UTC when token expires" + }, + "X-Rate-Limit": { + "type": "integer", + "format": "int32", + "description": "calls per hour allowed by the user" + } + }, + "schema": { + "type": "string" + } + }, + "422": { + "description": "Invalid input supplied" + } + } + } + }, + "/schedule/delete/{id}": { + "delete": { + "tags": [ + "Schedule" + ], + "produces": [ + "application/json" + ], + "operationId": "deleteSchedule", + "summary": "Delete schedule", + "description": "", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Schedule id", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "X-Expires-After": { + "type": "string", + "format": "date-time", + "description": "date in UTC when token expires" + }, + "X-Rate-Limit": { + "type": "integer", + "format": "int32", + "description": "calls per hour allowed by the user" + } + }, + "schema": { + "type": "string" + } + }, + "422": { + "description": "Invalid input supplied" + } + } + } + }, + "/remark/create": { + "post": { + "tags": [ + "Remark" + ], + "produces": [ + "application/json" + ], + "operationId": "createRemark", + "summary": "Create remark", + "description": "", + "parameters": [ + { + "name": "commenter_id", + "in": "query", + "description": "Commenter id", + "required": true, + "type": "integer" + }, + { + "name": "comment", + "in": "query", + "description": "Comment", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "X-Expires-After": { + "type": "string", + "format": "date-time", + "description": "date in UTC when token expires" + }, + "X-Rate-Limit": { + "type": "integer", + "format": "int32", + "description": "calls per hour allowed by the user" + } + }, + "schema": { + "type": "string" + } + }, + "422": { + "description": "Invalid input supplied" + } + } + } + }, + "/remark/update": { + "put": { + "tags": [ + "Remark" + ], + "produces": [ + "application/json" + ], + "operationId": "updateRemark", + "summary": "Update remark", + "description": "", + "parameters": [ + { + "name": "id", + "in": "query", + "description": "Remark id", + "required": true, + "type": "integer" + }, + { + "name": "commenter_id", + "in": "query", + "description": "Commenter id", + "required": true, + "type": "integer" + }, + { + "name": "comment", + "in": "query", + "description": "Comment", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "X-Expires-After": { + "type": "string", + "format": "date-time", + "description": "date in UTC when token expires" + }, + "X-Rate-Limit": { + "type": "integer", + "format": "int32", + "description": "calls per hour allowed by the user" + } + }, + "schema": { + "type": "string" + } + }, + "422": { + "description": "Invalid input supplied" + } + } + } + }, + "/remark/{id}/show": { + "get": { + "tags": [ + "Remark" + ], + "produces": [ + "application/json" + ], + "operationId": "showRemark", + "summary": "Show remarks", + "description": "", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Remark id", + "required": true, + "type": "integer" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "X-Expires-After": { + "type": "string", + "format": "date-time", + "description": "date in UTC when token expires" + }, + "X-Rate-Limit": { + "type": "integer", + "format": "int32", + "description": "calls per hour allowed by the user" + } + }, + "schema": { + "type": "string" + } + }, + "422": { + "description": "Invalid input supplied" + } + } + } + }, + "/remark/delete/{id}": { + "delete": { + "tags": [ + "Remark" + ], + "produces": [ + "application/json" + ], + "operationId": "deleteRemark", + "summary": "Delete remark", + "description": "", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Remark id", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "X-Expires-After": { + "type": "string", + "format": "date-time", + "description": "date in UTC when token expires" + }, + "X-Rate-Limit": { + "type": "integer", + "format": "int32", + "description": "calls per hour allowed by the user" + } + }, + "schema": { + "type": "string" + } + }, + "422": { + "description": "Invalid input supplied" + } + } + } + }, + "/remark/list": { + "get": { + "tags": [ + "Remark" + ], + "produces": [ + "application/json" + ], + "operationId": "listRemarks", + "summary": "List remarks", + "description": "", + "parameters": [ + { + "name": "filter", + "in": "query", + "description": "Filters", + "required": false, + "type": "array", + "items": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "X-Expires-After": { + "type": "string", + "format": "date-time", + "description": "date in UTC when token expires" + }, + "X-Rate-Limit": { + "type": "integer", + "format": "int32", + "description": "calls per hour allowed by the user" + } + }, + "schema": { + "type": "string" + } + }, + "422": { + "description": "Invalid input supplied" + } + } + } + }, + "/order/create": { + "post": { + "tags": [ + "Order" + ], + "produces": [ + "application/json" + ], + "operationId": "createOrder", + "summary": "Create order", + "description": "", + "parameters": [ + { + "name": "company_module_id", + "in": "query", + "description": "Company Module ID", + "required": true, + "type": "integer" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "X-Expires-After": { + "type": "string", + "format": "date-time", + "description": "date in UTC when token expires" + }, + "X-Rate-Limit": { + "type": "integer", + "format": "int32", + "description": "calls per hour allowed by the user" + } + }, + "schema": { + "type": "string" + } + }, + "422": { + "description": "Invalid input supplied" + } + } + } + }, + "/order/confirm/{id}": { + "put": { + "tags": [ + "Order" + ], + "produces": [ + "application/json" + ], + "operationId": "confirmOrder", + "summary": "Admin confirms order", + "description": "", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Order ID", + "required": true, + "type": "integer" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "X-Expires-After": { + "type": "string", + "format": "date-time", + "description": "date in UTC when token expires" + }, + "X-Rate-Limit": { + "type": "integer", + "format": "int32", + "description": "calls per hour allowed by the user" + } + }, + "schema": { + "type": "string" + } + }, + "422": { + "description": "Invalid input supplied" + } + } + } + }, + "/order/{id}/step/completes": { + "post": { + "tags": [ + "Order" + ], + "produces": [ + "application/json" + ], + "operationId": "completeOrderStep", + "summary": "Completes order step", + "description": "", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Order Id", + "required": true, + "type": "integer" + }, + { + "name": "reference", + "in": "query", + "description": "Order step reference", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "X-Expires-After": { + "type": "string", + "format": "date-time", + "description": "date in UTC when token expires" + }, + "X-Rate-Limit": { + "type": "integer", + "format": "int32", + "description": "calls per hour allowed by the user" + } + }, + "schema": { + "type": "string" + } + }, + "422": { + "description": "Invalid input supplied" + } + } + } + }, + "/address/create": { + "post": { + "tags": [ + "Address" + ], + "produces": [ + "application/json" + ], + "operationId": "createAddress", + "summary": "Create address", + "description": "", + "parameters": [ + { + "name": "district_id", + "in": "query", + "description": "District id", + "required": true, + "type": "integer" + }, + { + "name": "street_one", + "in": "query", + "description": "Address line 1", + "required": true, + "type": "string" + }, + { + "name": "street_two", + "in": "query", + "description": "Address line 2", + "required": true, + "type": "string" + }, + { + "name": "post_code", + "in": "query", + "description": "Postcode of the address", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "X-Expires-After": { + "type": "string", + "format": "date-time", + "description": "date in UTC when token expires" + }, + "X-Rate-Limit": { + "type": "integer", + "format": "int32", + "description": "calls per hour allowed by the user" + } + }, + "schema": { + "type": "string" + } + }, + "422": { + "description": "Invalid input supplied" + } + } + } + }, + "/address/delete/{id}": { + "delete": { + "tags": [ + "Address" + ], + "produces": [ + "application/json" + ], + "operationId": "deleteAddress", + "summary": "Delete address", + "description": "", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "District id", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "X-Expires-After": { + "type": "string", + "format": "date-time", + "description": "date in UTC when token expires" + }, + "X-Rate-Limit": { + "type": "integer", + "format": "int32", + "description": "calls per hour allowed by the user" + } + }, + "schema": { + "type": "string" + } + }, + "422": { + "description": "Invalid input supplied" + } + } + } + }, + "/address/district/list": { + "get": { + "tags": [ + "Address" + ], + "produces": [ + "application/json" + ], + "operationId": "listDistrictAddress", + "summary": "List districts", + "description": "", + "parameters": [ + { + "name": "filter", + "in": "query", + "description": "Filters", + "required": false, + "type": "array", + "items": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "X-Expires-After": { + "type": "string", + "format": "date-time", + "description": "date in UTC when token expires" + }, + "X-Rate-Limit": { + "type": "integer", + "format": "int32", + "description": "calls per hour allowed by the user" + } + }, + "schema": { + "type": "string" + } + }, + "422": { + "description": "Invalid input supplied" + } + } + } + }, + "/address/list": { + "get": { + "tags": [ + "Address" + ], + "produces": [ + "application/json" + ], + "operationId": "listAddress", + "summary": "List addresses of logged in user", + "description": "", + "parameters": [ + { + "name": "filter", + "in": "query", + "description": "Filters", + "required": false, + "type": "array", + "items": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "X-Expires-After": { + "type": "string", + "format": "date-time", + "description": "date in UTC when token expires" + }, + "X-Rate-Limit": { + "type": "integer", + "format": "int32", + "description": "calls per hour allowed by the user" + } + }, + "schema": { + "type": "string" + } + }, + "422": { + "description": "Invalid input supplied" + } + } + } + }, + "/address/{id}/show": { + "get": { + "tags": [ + "Address" + ], + "produces": [ + "application/json" + ], + "operationId": "showAddress", + "summary": "List addresses of logged in user", + "description": "", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Address id", + "required": true, + "type": "integer" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "X-Expires-After": { + "type": "string", + "format": "date-time", + "description": "date in UTC when token expires" + }, + "X-Rate-Limit": { + "type": "integer", + "format": "int32", + "description": "calls per hour allowed by the user" + } + }, + "schema": { + "type": "string" + } + }, + "422": { + "description": "Invalid input supplied" + } + } + } + }, + "/address/{id}/default": { + "put": { + "tags": [ + "Address" + ], + "produces": [ + "application/json" + ], + "operationId": "setDefaultAddress", + "summary": "Set default address", + "description": "", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Address id", + "required": true, + "type": "integer" + }, + { + "name": "district_id", + "in": "query", + "description": "District id", + "required": true, + "type": "integer" + }, + { + "name": "street_one", + "in": "query", + "description": "Address line 1", + "required": true, + "type": "string" + }, + { + "name": "street_two", + "in": "query", + "description": "Address line 2", + "required": true, + "type": "string" + }, + { + "name": "post_code", + "in": "query", + "description": "Postcode of the address", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "X-Expires-After": { + "type": "string", + "format": "date-time", + "description": "date in UTC when token expires" + }, + "X-Rate-Limit": { + "type": "integer", + "format": "int32", + "description": "calls per hour allowed by the user" + } + }, + "schema": { + "type": "string" + } + }, + "422": { + "description": "Invalid input supplied" + } + } + } + }, + "/address/update/{id}": { + "put": { + "tags": [ + "Address" + ], + "produces": [ + "application/json" + ], + "operationId": "updateAddress", + "summary": "Set default address", + "description": "", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Address id", + "required": true, + "type": "integer" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "X-Expires-After": { + "type": "string", + "format": "date-time", + "description": "date in UTC when token expires" + }, + "X-Rate-Limit": { + "type": "integer", + "format": "int32", + "description": "calls per hour allowed by the user" + } + }, + "schema": { + "type": "string" + } + }, + "422": { + "description": "Invalid input supplied" + } + } + } + }, + "/account/authentication/login/check_email": { + "post": { + "tags": [ + "Account", + "Flow - Registration" + ], + "summary": "Check if email registered", + "description": "", + "operationId": "checkEmail", + "produces": [ + "application/json", + "application/xml" + ], + "parameters": [ + { + "name": "email", + "in": "query", + "description": "email", + "required": true, + "type": "string" + } + ], + "responses": { + "default": { + "description": "successful operation" + } + } + } + }, + "/account/registration/registration": { + "post": { + "tags": [ + "Account", + "Flow - Registration" + ], + "produces": [ + "application/json" + ], + "summary": "Register user into the system", + "description": "", + "parameters": [ + { + "name": "name", + "in": "query", + "description": "The name of user", + "required": true, + "type": "string" + }, + { + "name": "email", + "in": "query", + "description": "The email for login", + "required": true, + "type": "string", + "format": "email" + }, + { + "name": "password", + "in": "query", + "description": "The password for login", + "required": true, + "type": "string", + "format": "password" + }, + { + "name": "password_confirmation", + "in": "query", + "description": "The confirmation password for login", + "required": true, + "type": "string", + "format": "password" + }, + { + "name": "type", + "in": "query", + "description": "Company Type - PERSONAL_BUSINESS:0 , COMPANY_BUSINESS:1", + "required": true, + "type": "integer" + }, + { + "name": "phone", + "in": "query", + "description": "Contact phone number", + "required": true, + "type": "string" + }, + { + "name": "contact_email", + "in": "query", + "description": "Contact email", + "required": true, + "type": "string" + }, + { + "name": "company_name", + "in": "query", + "description": "The company name - if not defined , name of user will save as the company name", + "required": false, + "type": "string" + }, + { + "name": "business_type", + "in": "query", + "description": "Business Type - FREIGHT_FORWARDER:1, IMPORTER:2, CURRENCY_VENDOR:3, WAREHOUSE:4", + "required": false, + "default": 2, + "type": "integer" + }, + { + "name": "wechat_id", + "in": "query", + "description": "Contact Wechat id", + "required": false, + "type": "string" + }, + { + "name": "files[0]", + "in": "query", + "description": "File need to convert to base64 example : 'data:application/pdf;base64,{Base64}';", + "required": true, + "type": "string" + }, + { + "name": "identification_no", + "in": "query", + "description": "Personal identification no or company registration no", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "X-Expires-After": { + "type": "string", + "format": "date-time", + "description": "date in UTC when token expires" + }, + "X-Rate-Limit": { + "type": "integer", + "format": "int32", + "description": "calls per hour allowed by the user" + } + }, + "schema": { + "type": "string" + } + }, + "400": { + "description": "Invalid username/password supplied" + } + } + } + }, + "/account/authentication/login/attempt": { + "post": { + "tags": [ + "Account" + ], + "produces": [ + "application/json" + ], + "summary": "Logs user into the system", + "operationId": "aaa", + "description": "", + "parameters": [ + { + "name": "email", + "in": "query", + "description": "The user name for login", + "required": true, + "type": "string" + }, + { + "name": "password", + "in": "query", + "description": "The password for login in clear text", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "X-Expires-After": { + "type": "string", + "format": "date-time", + "description": "date in UTC when token expires" + }, + "X-Rate-Limit": { + "type": "integer", + "format": "int32", + "description": "calls per hour allowed by the user" + } + }, + "schema": { + "type": "string" + } + }, + "400": { + "description": "Invalid username/password supplied" + } + } + } + }, + "/account/authentication/logout": { + "get": { + "tags": [ + "Account" + ], + "summary": "Logs out current logged in user session", + "description": "", + "operationId": "logoutUser", + "produces": [ + "application/json", + "application/xml" + ], + "parameters": [], + "responses": { + "default": { + "description": "successful operation" + } + } + } + }, + "/account/user/list": { + "get": { + "tags": [ + "Account" + ], + "summary": "Logs out current logged in user session", + "description": "", + "operationId": "userList", + "produces": [ + "application/json", + "application/xml" + ], + "parameters": [], + "responses": { + "default": { + "description": "successful operation" + } + } + } + }, + "/company/list": { + "get": { + "tags": [ + "Company" + ], + "summary": "List of Companies", + "description": "example filters={\"WithCompanyModuleType\":4,\"order_by\":{\"column\":\"id\",\"DESC\":true}} | to get list of company with company_module.Type(business type) = 4(Warehouse)", + "operationId": "companyList", + "produces": [ + "application/json", + "application/xml" + ], + "parameters": [ + { + "name": "filters", + "in": "query", + "description": "Eloquent Filter", + "required": false, + "type": "array", + "items": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "successful operation" + } + } + } + }, + "/company/create": { + "post": { + "tags": [ + "Company" + ], + "summary": "Create company", + "description": "", + "operationId": "companyCreate", + "produces": [ + "application/json", + "application/xml" + ], + "parameters": [ + { + "name": "type", + "in": "query", + "description": "Company Type - PERSONAL_BUSINESS:0 , COMPANY_BUSINESS:1", + "required": true, + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + { + "name": "business_type", + "in": "query", + "description": "Business Type - FREIGHT_FORWARDER:1, IMPORTER:2, CURRENCY_VENDOR:3, WAREHOUSE:4", + "required": true, + "type": "integer", + "enum": [ + 1, + 2, + 3, + 4 + ] + }, + { + "name": "name", + "in": "query", + "description": "Fill in name if type = 0", + "required": false, + "type": "string" + }, + { + "name": "name", + "in": "query", + "description": "Fill in name if type = 0", + "required": false, + "type": "string" + }, + { + "name": "company_name", + "in": "query", + "description": "Fill in company_name if type = 1", + "required": false, + "type": "string" + } + ], + "responses": { + "default": { + "description": "successful operation" + } + } + } + } + }, + "securityDefinitions": { + "Authorization": { + "type": "apiKey", + "name": "api_key", + "in": "header" + }, + "petstore_auth": { + "type": "oauth2", + "authorizationUrl": "https://petstore.swagger.io/oauth/authorize", + "flow": "implicit", + "scopes": { + "read:pets": "read your pets", + "write:pets": "modify pets in your account" + } + } + }, + "definitions": { + "ApiResponse": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "title": { + "type": "string" + }, + "message": { + "type": "string" + }, + "payload": { + "type": "object" + } + } + } + } }