Description
To allow integration with the external services Web API for Source Management is required. It should provide set of endpoints enabling third-parties with CRUD operations on Sources.
Acceptance Criteria
- Source Management Web API operates with the data structures described in
SourceInterface
- Source Management Provides the following list of operations on Sources:
- Loading of the single Source entity by identifier with the
GET request.
- Loading the list of Sources filtered by search criteria with the
GET request.
- Creation of the new Source from the
SourceInterface data with the POST request.
- Update of the existing Source providing identifier and
SourceInterface data with the PUT request.
- ACL is defined for endpoints.
Details
| Resource |
Request method |
Permissions |
Payload |
Response |
Implementation |
Description |
/V1/inventory/source/:sourceId |
GET |
Admin InventoryApi::source |
|
SourceInterface |
Magento\InventoryApi\Api\SourceRepositoryInterface::get |
Get Single Source by identifier |
/V1/inventory/source/search |
GET |
Admin InventoryApi::source |
|
SourceInterface[] |
Magento\InventoryApi\Api\SourceRepositoryInterface::getList |
Load Sources filtered by Search Criteria |
/V1/inventory/source |
POST |
Admin InventoryApi::source, InventoryApi::source_edit |
SourceInterface |
Created source_id |
Magento\InventoryApi\Api\SourceRepositoryInterface::save |
Create Source |
/V1/inventory/source/:sourceId |
PUT |
Admin InventoryApi::source |
SourceInterface |
SourceInterface |
Magento\InventoryApi\Api\SourceRepositoryInterface::save |
Update Source |
Documentation: Source WebAPI
Description
To allow integration with the external services Web API for Source Management is required. It should provide set of endpoints enabling third-parties with CRUD operations on Sources.
Acceptance Criteria
SourceInterfaceGETrequest.GETrequest.SourceInterfacedata with thePOSTrequest.SourceInterfacedata with thePUTrequest.Details
/V1/inventory/source/:sourceIdInventoryApi::sourceSourceInterfaceMagento\InventoryApi\Api\SourceRepositoryInterface::get/V1/inventory/source/searchInventoryApi::sourceSourceInterface[]Magento\InventoryApi\Api\SourceRepositoryInterface::getList/V1/inventory/sourceInventoryApi::source,InventoryApi::source_editSourceInterfacesource_idMagento\InventoryApi\Api\SourceRepositoryInterface::save/V1/inventory/source/:sourceIdInventoryApi::sourceSourceInterfaceSourceInterfaceMagento\InventoryApi\Api\SourceRepositoryInterface::saveDocumentation: Source WebAPI