Introduction

This document gives Pulpo WMS customers some guidelines to integrate ERP systems. For better understanding it is necessary to know swagger documentations. (See Getting started with Swagger UI for more information)

There are 2 different type of data transfers:

  • From ERP to Pulpo WMS via integration
  • From Pulpo WMS to ERP:
  • Via integration
  • Registering to a webhook from PulpoWMS to ERP (Real time updates)

Entity Overview

The next diagram shows an overview over the most important entities in Pulpo WMS. Note that not all associations are shown.

General API integration

Description how to authorize to Pulpo WMS and be able to make further API calls.

Authorization

The authorization in Pulpo WMS is done with Oauth token which is used in the headers of later API calls.

A token is valid for 12 hours. 

Please do not request a new token for each API call

Please implement a fallback strategy for failure scenarios

Example request

curl --location --request POST 'https://show.pulpo.co/api/v1/auth' \
--header 'Content-Type: application/json' \
--data-raw '{
"grant_type": "password",
"username" : "someuser",
"password" : "somepassword",
"scope" : "default"
}'

Response

{
"access_token": "7qZxedjvemt5eZcfJvqNlHxyAkFnvFdjAs",
"expires_in": 43200,
"scope": "default",
"token_type": "bearer"
}

Usage

curl --location --request GET 'https://show.pulpo.co/api/v1/setting' \
--header 'Authorization: Bearer 7qZxedjvemt5eZcfJvqNlHxyAkFnvFdjAs' \
--header 'Content-Type: application/json' \

Basic data

To be able to create most of the data, the API needs the tenant_id. To get this and other basic data, please use the following endpoint:

https://show.pulpo.co/api/v1/swagger/index.html#/Iam/Wms_Iam_UserController_me

Notice that warehouses must be assigned to a user in order to execute operations in each warehouse.

Get information about one or multiple warehouses. 

API: https://show.pulpo.co/api/v1/swagger/index.html#/Warehouse/Wms_Warehouse_WarehouseController_index

Search

To search for multiple values please use brackets.

For example this query searches for the products 1456 and 1457:

/api/v1/inventory/products?id[]=1456&id[]=1457

Data transfer from your ERP to Pulpo WMS

Following data is usually synchronized from the ERP system to Pulpo WMS

Third parties - Customers and Suppliers

API: https://show.pulpo.co/api/v1/swagger/index.html#/Iam/Wms_Iam_ThirdPartyController_create

Products

API: https://show.pulpo.co/api/v1/swagger/index.html#/Inventory/Wms_Inventory_ProductController_create

Sales Orders

API: https://show.pulpo.co/api/v1/swagger/index.html#/Sales/Wms_Sales_SalesOrderController_create

Purchase Orders

API: https://show.pulpo.co/api/v1/swagger/index.html#/Reception/Wms_Reception_PurchaseOrderController_create

Data transfer from Pulpo WMS to your ERP

Following data is usually synchronized from Pulpo WMS system to the ERP system

Stock

API: https://show.pulpo.co/api/v1/swagger/index.html#/Inventory/Wms_Inventory_StockController_search

Webhooks

Through webhooks you can get real time data from Pulpo WMS to another system by registering an API which receives and processes a specific payload

API: https://show.pulpo.co/api/v1/swagger/index.html#/Webhook/Wms_Webhook_WebhookController_create

Implementation help - Magento Plugin for Pulpo WMS

Client Code Generation

To speed up the implementation swagger-codegen offers automatic generation of clients from a swagger json definition in different languages. 

Pulpo’s swagger json can be found in: https://show.pulpo.co/api/v1/swagger/wms.json

The list of supported languages can be found in: https://generator.swagger.io/api/gen/clients

The tool documentation can be found in: README.md 

An example how to generate a javascript client from a mac computer from the console:

123brew install swagger-codegenswagger-codegen generate -i https://show.pulpo.co/api/v1/swagger/wms.json -l javascript


Known issues from other integrations:

This plugin for Magento 2.0 may guide as help to integrate following data:

  • Products
  • Sales orders

User guide: https://marketplace.magento.com/media/catalog/product/pulpo_wms-module-pulpowms-1-0-1-ce/user_guides.pdf

Files containing implementation guides:

PulpoWms/Controller/Index/Index.php: listener for Pulpo WMS webhooks

PulpoWms/Cron: Cron jobs to send sales orders and products from Magento to Pulpo WMS

PulpoWms/Helper/Data.php : Helper for authentication process

You can download the Magento plugin from the Magento pluginstore for free. Whenever you have questions, feel free to contact us!

Did this answer your question?