Introduction

MBE LAB | Logistics in a box

To allow other third-party software to interface with the platform, we have implemented and released a number of REST APIs, listed in this document.

Note that access to apis is closely linked by having a license active
The number of API requests available is limited to 20,000 requests/month

HTTP status codes

The following are http status codes that can be received from an MBE LAB API client.

Status code Meaning

200 OK

Standard response for successful HTTP requests.

403 Forbidden

The request is valid but the server refuses to fulfill it. The user may not have the necessary permissions to access the resource. if so follow the authentication paragraph

500 Limit exceed

The request is valid but the number of requests made has exceeded the limit of requests provided by the account.

Authentication

In order to access the MABE LAB API service, you must proceed with authentication, which consists of including an API key in the request.

You will need to access the cloud panel and generate an api key from the cloud panel menu

After that, place the generated token in the request HEADER, with the x-api-key name parameter

Management CORS Policy

The Cross-Origin Resource Sharing (CORS) is a mechanism that uses additional HTTP headers to indicate to a browser that a Web application running on a source (domain) has permission to access selected resources from a server of different origin. A web application sends an HTTP request cross-origin when it requests a resource that has a different source (protocol, domain, and port) than its own.

Reference or other information Here:

MBE LAB handles these controls as follows:

When the HTTP request source is judged to be unsafe, a handshake (preflight) request is sent with the OPTION method, which will list all the characteristics required to validate the caller.

  • Validation will take place through the following steps: (Access-Control-Allow-Methods) Method validation: (Access-Control-Allow-Methods) HTTP methods outside the list of allowed methods will be discarded. The accepted HTTP methods will vary based on the API invoked, but still cyclamen between GET, POST, OPTION.

  • Header validation: (Access-Control-Allow-Headers) (Access-Control-Allow-Headers) if the submitted request contains unsupported headers, then the request will not be met.
    Currently, the list of supported and accepted headers is as follows:

    • Content-Type
    • X-Amz-Date
    • Authorization
    • X-Api-Key
    • X-Amz-Security-Token

    If an unsupported header is inserted, the generated and visible error in the browser console looks like this:
    Access to XMLHttpRequest at 'https://1v7y6w1ki1.execute-api.eu-west-1.amazonaws.com/X/Y' from origin 'ORIGIN' has been blocked by CORS policy: Request header field UNSUPPORTED_FIELD is not allowed by Access-Control-Allow-Headers in preflight response.
  • Source validation: (Access-Control-Allow-Origin) list of accepted source domains, set to All (*)

Articles

This section lists all the methods available for managing the Item resource.

A1. getArticles

GET https://lnii51g4m5.execute-api.eu-west-1.amazonaws.com/[fase]/article/get

[fase]: Execution environment. (dev,prod)

Gets the list of item data created in MBE LAB.

HTTP Request

GET https://lnii51g4m5.execute-api.eu-west-1.amazonaws.com/[fase]/article/get HTTP/1.1
Accept-Encoding: gzip,deflate
x-api-key: Your-API-Key
Connection: Keep-Alive
	

Request Parameter

Field Type Description Constraints

page_size

Integer

How many maximum results to return

Greater than zero

Default: 25

page_number

Integer

Page number requested by the user. Useful for any paginations

Greater than zero

Default: 1

id

String

Article identification

Optional

sku

String

Article code

Optional

EAN

String

Article barcode

Optional

COD2

String

Article subcode

Optional

COD3

String

Article manufacturer code

Optional

description

String

Articolo description

Optional

brand

String

Article Brand

Optional

type

String

Article type

Optional- accepted values [s,v,k,kp]

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
{
        "code" : true,
        "message" : "",
        "tot_record": 207,
        "page_number": 1,
        "page_size": 25,
        "response" : 
        [
            {
         "id": "D.20.193.1301",
         "type": "V",
         "parent_id": "D.20.193.1300",
         "sku": "99FG_azzurro_3xl",
         "EAN": " ",
         "COD2": " ",
         "COD3": " ",
         "brand": " ",
         "description": "test variants_Azzurro 3XL",
         "category": " ",
         "UM": "NR",
         "UM2": " ",
         "UMK": "0",
         "pieces": 0,
         "location": "D.20.176.1:;",
         "vat": 22,
         "serial": 0,
         "is_lot_item": 0,
         "is_expired_item": 0,
         "peso": "0",
         "imgage1": " ",
         "image2": " ",
         "image3": " ",
         "image4": " ",
         "min_stock": 0,
         "volume": 0,
         "height": 0,
         "width": 0,
         "depth": 0,
         "attributes":          [
                        {
               "name": "Colore",
               "value": "Azzurro"
            },
                        {
               "name": "Taglie internazionali",
               "value": "3XL"
            }
         ]
      },
         ...
        ]
}

Response parameters

Field Type Description

code

Boolean

exit value

message

String

Any information that produced the 'result'

tot_record

Integer

Total items found

page_number

Integer

Page number

page_size

Integer

Items for page

response

Array Json

Set of items

A2. Create Articles

POST https://lnii51g4m5.execute-api.eu-west-1.amazonaws.com/[fase]/article/create

[fase]: Execution environment. (dev,prod)

The procedure creates one or more items. (Max 100 items for request.)
Note 1: Does not create for items that are already present with the same primary code sent.
Note 2: This API DOES NOT support adding photos during creation.

HTTP Request

POST https://lnii51g4m5.execute-api.eu-west-1.amazonaws.com/[fase]/article/create HTTP/1.1
Accept-Encoding: gzip,deflate
x-api-key: Your-API-Key
Connection: Keep-Alive

HTTP Request

Insert json-format request message into the body

Field Type Description Constraints

sku

String

The primary code of the item. Also useful for verifying the existence of a duplicate

Required

ean

String

Barcode

Default: empty string

type

String

Simple or variant item type

Optional. default value [s] - accepted values [s,v,k,kp]

cod2

String

Article subcode

Default: empty string

cod3

String

Article manufacturer code

Default: empty string

brand

String

Brand

Default: empty string

description

String

Description of the article

Default: empty string

category

String

Article category

Default: empty string

um

String

Units of measurement of the article

Default: NR (Number)

um2

String

Alternative / secondary unit of measure of the article

Default: empty string

pieces

Integer

Number of pieces per package of the item

Default: 1

cost

float

Cost of article from supplier

Default: 0

weight

Float

Article Weight

Default: 0

height

Float

Article Height

Default: 0

width

Float

Article width

Default: 0

depth

Float

Article depth

Default: 0

min_stock

Float

Minimum stock value to set to item

Default: 0

is_serial_item

Float

is a serial item

Default: 0

is_lot_item

Float

is a lot item

Default: 0

is_expired_item

Float

is a lot/expiration item

Default: 0

kitcomponents

Array of JSON

 
                                        [{"id": "D.20.196.1",
                                        "qnt": "2"
                                        },
                                        {"id": "D.20.196.3",
                                        "qnt": "3"
                                        }]

List of components of KIT

Required if type=K or type=KP

package_weight

Float

Package Weight

Default: 0

package_height

Float

Package Height

Default: 0

package_width

Float

Package width

Default: 0

package_depth

Float

Package depth

Default: 0

package_ean

String

Package EAN

Default: empty string

calculate_space_package

Int

Set with 1 if you want use volume of package

Default: 0 - accepted values [0,1]

customfields

Array of JSON

 
                                        [{
                                            "field_id": "7",
                                            "field_value": "13%"
                                        },
                                        {
                                            "field_idid": "7",
                                            "field_value": "rosè"
                                        }]

List of custom fields of article

HTTP Response

HTTP/1.1 200 OK
Date: Thu, 04 Nov 2019 13:35:40 GMT
Content-Type: application/json
Content-Length: 96
Connection: keep-alive
x-amzn-RequestId: a4da5d82-7d5f-11e9-8897-19a42a5e3db5
x-amz-apigw-id: aI4yIG5mDoEFnGQ=
x-custom-header: header_api
X-Amzn-Trace-Id: Root=1-5ce6a1a7-6fa0dac81921f322a865c51c;Sampled=0

{
   "code": true,
   "message": "",
   "response":    {
      "info":       [
         "D.20.381.469",
         "D.20.381.470"
      ],
      "result":       {
         "errors": 0,
         "error_messages": [],
         
      }
   }
}

Response parameter

Field Type Description

code

Boolean

exit code

message

String

Any information that produced the result

response

Json

Result container

response.info

Array

Item IDs created

response.errors

Integer

Number of errors encountered

response.error_messages

Array JSON

List of error messages

A3. Update Articles

POST https://lnii51g4m5.execute-api.eu-west-1.amazonaws.com/[fase]/article/update

[fase]: Execution environment. (dev,prod)

The procedure creates or update one or more items. (Max 100 items for request.)
Note 1: Create the items if not exsist.
Note 2: This API DOES NOT support adding photos during creation.

HTTP Request

POST https://lnii51g4m5.execute-api.eu-west-1.amazonaws.com/[fase]/article/update HTTP/1.1
Accept-Encoding: gzip,deflate
x-api-key: Your-API-Key
Connection: Keep-Alive

Request parameter

Insert json-format request message into the body

Field Type Description Constraints

id

String

LAB ID Document

Required

sku

String

The primary code of the item. Also useful for verifying the existence of a duplicate

Required

ean

String

Barcode

Default: empty string

type

String

Simple or variant item type

Optional. default value [s] - accepted values [s,v,k,kp]

cod2

String

Article subcode

Default: empty string

cod3

String

Article manufacturer code

Default: empty string

brand

String

Brand

Default: empty string

description

String

Description of the article

Default: empty string

category

String

Article category

Default: empty string

um

String

Units of measurement of the article

Default: NR (Number)

um2

String

Alternative / secondary unit of measure of the article

Default: empty string

pieces

Integer

Number of pieces per package of the item

Default: 1

cost

float

Cost of article from supplier

Default: 0

weight

Float

Article Weight

Default: 0

height

Float

Article Height

Default: 0

width

Float

Article width

Default: 0

depth

Float

Article depth

Default: 0

min_stock

Float

Minimum stock value to set to item

Default: 0

is_serial_item

Float

is a serial item

Default: 0

is_lot_item

Float

is a lot item

Default: 0

is_expired_item

Float

is a lot/expiration item

Default: 0

kitcomponents

Array of JSON

 
                                        [{"id": "D.20.196.1",
                                        "qnt": "2"
                                        },
                                        {"id": "D.20.196.3",
                                        "qnt": "3"
                                        }]

List of components of KIT

Required if type=K or type=KP

package_weight

Float

Package Weight

Default: 0

package_height

Float

Package Height

Default: 0

package_width

Float

Package width

Default: 0

package_depth

Float

Package depth

Default: 0

package_ean

String

Package EAN

Default: empty string

calculate_space_package

Int

Set with 1 if you want use volume of package

Default: 0 - accepted values [0,1]

customfields

Array of JSON

 
                                        [{
                                            "field_id": "7",
                                            "field_value": "13%"
                                        },
                                        {
                                            "field_idid": "7",
                                            "field_value": "rosè"
                                        }]

List of custom fields of article

HTTP Response

HTTP/1.1 200 OK
Date: Thu, 04 Nov 2019 13:35:40 GMT
Content-Type: application/json
Content-Length: 96
Connection: keep-alive
x-amzn-RequestId: a4da5d82-7d5f-11e9-8897-19a42a5e3db5
x-amz-apigw-id: aI4yIG5mDoEFnGQ=
x-custom-header: header_api
X-Amzn-Trace-Id: Root=1-5ce6a1a7-6fa0dac81921f322a865c51c;Sampled=0

{
   "code": true,
   "message": "",
   "response":    {
      "info":       [
         "D.20.381.469",
         "D.20.381.470"
      ],
      "result":       {
         "errors": 0,
         "error_messages": [],
         
      }
   }
}

Response parameter

Field Type Description

code

Boolean

exit code

message

String

Any information that produced the result

response

Json

Result container

response.info

Array

Item IDs created

response.errors

Integer

Number of errors encountered

response.error_messages

Array JSON

List of error messages

A4. Delete Article

POST https://lnii51g4m5.execute-api.eu-west-1.amazonaws.com/[fase]/article/delete

[fase]: Execution environment. (dev,prod)

The procedure deletes an item.

HTTP Request

GET https://lnii51g4m5.execute-api.eu-west-1.amazonaws.com/[fase]/article/delete HTTP/1.1
Accept-Encoding: gzip,deflate
x-api-key: Your-API-Key
Connection: Keep-Alive

Request parameter

Insert json-format request message into the body

Field Type Description Constraints

id

String

ID of items.

Required

HTTP Response

HTTP/1.1 200 OK
Date: Thu, 04 Nov 2019 13:35:40 GMT
Content-Type: application/json
Content-Length: 96
Connection: keep-alive
x-amzn-RequestId: a4da5d82-7d5f-11e9-8897-19a42a5e3db5
x-amz-apigw-id: aI4yIG5mDoEFnGQ=
x-custom-header: header_api
X-Amzn-Trace-Id: Root=1-5ce6a1a7-6fa0dac81921f322a865c51c;Sampled=0

{
   "code": true,
   "message": "Api conclusa",
   "response":    {
      "fieldCount": 0,
      "affectedRows": 1,
      "insertId": 0,
      "serverStatus": 2,
      "warningCount": 2,
      "message": "(Rows matched: 1  Changed: 1  Warnings: 2",
      "protocol41": true,
      "changedRows": 1
   }
}

Response parameter

Field Type Description

code

Boolean

Exit code

message

String

Any information that produced the result

response

Json

Final result container

Recipients

This section lists all the methods available for managing the Recipients resource.

D1. Get Recipients

GET https://lnii51g4m5.execute-api.eu-west-1.amazonaws.com/[fase]/recipient/get

Gets the list of Recipients created in MBE LAB

[fase]: Execution environment. (dev,prod)

HTTP Request

GET https://lnii51g4m5.execute-api.eu-west-1.amazonaws.com/[fase]/recipient/get HTTP/1.1
Accept-Encoding: gzip,deflate
x-api-key: Your-API-Key
Connection: Keep-Alive
	

Request parameter

Field Type Description Constraints

page_size

Integer

The maximum number of items to return

Greater than zero

Default: 25 - MAX: 100

page_number

Integer

Indicates the page number requested by the user. Useful for any paginations

Greater than zero

Default: 1

id

String

LAB ID of Recipient

Optional

code

String

External code of recipient

Optional

company_name

String

Recipient's business name

Optional

tax_code

String

Tax code

Optional

vat_number

String

VAT number

Optional

province

String

Abbreviation of the Province

Optional

city

String

City of the Recipient

Optional

address

String

Address of the Recipient

Optional

HTTP Response

HTTP/1.1 200 OK
Date: Thu, 23 May 2019 13:35:40 GMT
Content-Type: application/json
Content-Length: 96
Connection: keep-alive
x-amzn-RequestId: a4da5d82-7d5f-11e9-8897-19a42a5e3db5
x-amz-apigw-id: aI4yIG5mDoEFnGQ=
x-custom-header: header_api
X-Amzn-Trace-Id: Root=1-5ce6a1a7-6fa0dac81921f322a865c51c;Sampled=0

{
   "code": true,
   "message": "Api conclusa",
   "tot_record": 98,
   "page_number": 1,
   "pagesize": 10,
   "response":    [
               {
         "id": "D.20.179.1",
         "code": null,
         "company_name": "Mario Rossi",
         "address": "Via Roma, 12",
         "postcode": "83020",
         "tax_code": null,
         "vat_number": null,
         "country": "IT",
         "city": "Sriginano",
         "province": "AV"
      },
      .......
   ]
}
							

Parametri risposta

Field Type Description

code

Boolean

Exit code

message

String

Result information

tot_record

Integer

Total items found

page_number

Integer

Page number

page_size

Integer

Total items per page

response

Array Json

Set of items found

D2. Create Recipient

POST https://lnii51g4m5.execute-api.eu-west-1.amazonaws.com/[fase]/recipient/create

Create a new Recipient in MBE LAB.

[fase]: Execution environment. (dev,prod)

HTTP Request

Insert json-format request message into the body

POST https://lnii51g4m5.execute-api.eu-west-1.amazonaws.com/[fase]/recipient/create HTTP/1.1
Accept-Encoding: gzip,deflate
x-api-key: Your-API-Key
Connection: Keep-Alive

{
     "company_name": "Tilto Spa",
     "name": "Andrea Ferrante",
     "address": "via roma, 133",
     "code": "andrea_33",    
     "tipo_soggetto": "1",
     "tax_code": "",
     "vat_number":"000999888",     
     "province": "NA",
     "postcode": "80036",
     "city": "Palma Campania",
     "country": "IT",
     "contacts":[{"type":"email","value":"andrea.ferrante@advise.it"}]
     }
	

Parametri Richiesta

Field Type Description Constraints

company_name

String

Business name

Required

name

String

First name - surname

Optional

address

String

Address

Optional

code

String

Other Code

Optional

type_subject

Integer

Enhance with 1->Business, 2->Private, 3->Public Authority

Default: 2

tax_code

String

Tax Code

Optional

vat_number

String

VAT Number

optional

province

String

Province (abbreviation

optional

city

String

City

optional

postcode

String

Postal code

optional

country

String

Nation

optional

contacts

Array JSON

Contacts Set

type: email,phone,mobile,other

value: contact

optional

HTTP Response

HTTP/1.1 200 OK
Date: Thu, 23 May 2019 13:35:40 GMT
Content-Type: application/json
Content-Length: 96
Connection: keep-alive
x-amzn-RequestId: a4da5d82-7d5f-11e9-8897-19a42a5e3db5
x-amz-apigw-id: aI4yIG5mDoEFnGQ=
x-custom-header: header_api
X-Amzn-Trace-Id: Root=1-5ce6a1a7-6fa0dac81921f322a865c51c;Sampled=0
{
   "code": true,
   "message": "",
   "response":    {
      "info": "Procedura terminata",
      "esito": true,
      "recipient":"D.XXX.XX.X"
   }
}
							

Response parameters

Field Type Description

code

Boolean

Exit code

message

String

Result informations

response

Json Object

Final result container

D3. Update Recipient

POST https://lnii51g4m5.execute-api.eu-west-1.amazonaws.com/[fase]/recipient/update

Updates a Recipient in MBE LAB.

[fase]: Execution environment. (dev,prod)

HTTP Request

Insert json-format request message into the body

POST https://lnii51g4m5.execute-api.eu-west-1.amazonaws.com/[fase]/recipient/update HTTP/1.1
Accept-Encoding: gzip,deflate
x-api-key: Your-API-Key
Connection: Keep-Alive

{
    "id":"B.123.23.123",
     "company_name": "Tilto Spa",
     "name": "Andrea Ferrante",
     "address": "via roma, 133",
     "code": "andrea_33",    
     "tipo_soggetto": "1",
     "tax_code": "",
     "vat_number":"000999888",     
     "province": "NA",
     "postcode": "80036",
     "city": "Palma Campania",
     "country": "IT",
     "contacts":[{"type":"email","value":"andrea.ferrante@advise.it"}]
     }
	

Request parameters

Field Type Description Constraints

id

String

LAB ID Recipient

company_name

String

Business name

Required

name

String

First name - surname

Optional

address

String

Address

Optional

code

String

Other Code

Optional

type_subject

Integer

Enhance with 1->Business, 2->Private, 3->Public Authority

Default: 2

tax_code

String

Tax Code

Optional

vat_number

String

VAT Number

optional

province

String

Province (abbreviation

optional

city

String

City

optional

postcode

String

Postal code

optional

country

String

Nation

optional

contacts

Array JSON

Contacts Set

type: email,phone,mobile,other

value: contact

optional

HTTP Response

HTTP/1.1 200 OK
                                    Date: Thu, 23 May 2019 13:35:40 GMT
                                    Content-Type: application/json
                                    Content-Length: 96
                                    Connection: keep-alive
                                    x-amzn-RequestId: a4da5d82-7d5f-11e9-8897-19a42a5e3db5
                                    x-amz-apigw-id: aI4yIG5mDoEFnGQ=
                                    x-custom-header: header_api
                                    X-Amzn-Trace-Id: Root=1-5ce6a1a7-6fa0dac81921f322a865c51c;Sampled=0
                                    {
                                       "code": true,
                                       "message": "Api conclusa",
                                       "response":    {
                                          "info": "Procedura terminata",
                                          "esito": true,
                                          "recipient":"D.XXX.XX.X"
                                       }
                                    }
                                 

Response parameters

Field Tipo Description

code

Boolean

Exit code

message

String

Result informations

response

Json Object

Final result container

Suppliers

This section lists all the methods available for managing the Vendor resource.

F1. Get Suppliers

GET https://lnii51g4m5.execute-api.eu-west-1.amazonaws.com/[fase]/supplier/get

Gets the list of vendors created in MBE LAB.

HTTP Request

GET https://lnii51g4m5.execute-api.eu-west-1.amazonaws.com/[fase]/supplier/get HTTP/1.1
Accept-Encoding: gzip,deflate
x-api-key: Your-API-Key
Connection: Keep-Alive
	

Request parameters

Field Type Description Constraints

page_size

Integer

The maximum number of items to return

Greater than zero

Default: 25 - MAX: 100

page_number

Integer

Indicates the page number requested by the user. Useful for any paginations

Greater than zero

Default: 1

id

String

LAB ID of Supplier

Optional

company_name

String

Business name

Optional

tax_code

String

Tax code

Optional

vat_number

String

VAT number

Optional

province

String

Abbreviation of the Province

Optional

city

String

City

Optional

address

String

Address

Optional

Risposta HTTP

HTTP/1.1 200 OK
Date: Thu, 23 May 2019 13:35:40 GMT
Content-Type: application/json
Content-Length: 96
Connection: keep-alive
x-amzn-RequestId: a4da5d82-7d5f-11e9-8897-19a42a5e3db5
x-amz-apigw-id: aI4yIG5mDoEFnGQ=
x-custom-header: header_api
X-Amzn-Trace-Id: Root=1-5ce6a1a7-6fa0dac81921f322a865c51c;Sampled=0

{
   "code": true,
   "message": "Api conclusa",
   "tot_record": 98,
   "page_number": 1,
   "pagesize": 10,
   "response":    [
             {
      "id": "D.20.178.8",
      "code": " ",
      "company_name": "Uragan",
      "address": " ",
      "postcode": " ",
      "tax_code": "",
      "vat_number": "11133344411",
      "country": "IT",
      "city": " ",
      "province": " "
   },
      .......
   ]
}
							

Response parameters

Field Type Descriptions

code

Boolean

Exit code

message

String

Result information

tot_record

Integer

Total items found

page_number

Integer

Page number

page_size

Integer

Total items per page

response

Array Json

Set of items found

F2. Create Supplier

POST https://lnii51g4m5.execute-api.eu-west-1.amazonaws.com/[fase]/supplier/create

Create Suppliers in MBE LAB.

[fase]: Execution environment. (dev,prod)

HTTP Request

Insert json-format request message into the body

POST https://lnii51g4m5.execute-api.eu-west-1.amazonaws.com/[fase]/supplier/create HTTP/1.1
Accept-Encoding: gzip,deflate
x-api-key: Your-API-Key
Connection: Keep-Alive

[{
    
     "company_name": "Tilto Spa",
     "name": "Andrea Ferrante",
     "address": "via roma, 133",
     "code": "andrea_33",    
     "tipo_soggetto": "1",
     "tax_code": "",
     "vat_number":"000999888",     
     "province": "NA",
     "postcode": "80036",
     "city": "Palma Campania",
     "country": "IT"
     },
...
]
	

Parametri Richiesta

Fiels Type Description Constraints

company_name

String

Business name

Required

name

String

First name - surname

Optional

address

String

Address

Optional

code

String

Other Code

Optional

tax_code

String

Tax Code

Optional

vat_number

String

VAT Number

optional

province

String

Province (abbreviation)

optional

city

String

City

optional

postcode

String

Postal code

optional

country

String

Nation

optional

HTTP response

HTTP/1.1 200 OK
Date: Thu, 23 May 2019 13:35:40 GMT
Content-Type: application/json
Content-Length: 96
Connection: keep-alive
x-amzn-RequestId: a4da5d82-7d5f-11e9-8897-19a42a5e3db5
x-amz-apigw-id: aI4yIG5mDoEFnGQ=
x-custom-header: header_api
X-Amzn-Trace-Id: Root=1-5ce6a1a7-6fa0dac81921f322a865c51c;Sampled=0
{
   "code": true,
   "message": "Api conclusa",
   "response":    {
      "info":       [
         "D.20.381.469",
         "D.20.381.470"
      ],
      "result":       {
         "errors": 0,
         "error_messages": [],
         
      }
   }
}
							

Response parameters

Field Type Description

code

Boolean

Exit code

message

String

response

Json

Final result

response.info

Array

IDs of new elements

response.errors

Integer

number of errors

response.error_messages

Array JSON

Details af errors

F3. Update Suppliers

POST https://lnii51g4m5.execute-api.eu-west-1.amazonaws.com/[fase]/supplier/update

Updates and creates if there are no Vendors in MBE LAB.

[fase]: Execution environment. (dev,prod)

HTTP Request

Insert json-format request message into the body

POST https://lnii51g4m5.execute-api.eu-west-1.amazonaws.com/[fase]/supplier/update HTTP/1.1
Accept-Encoding: gzip,deflate
x-api-key: Your-API-Key
Connection: Keep-Alive

[{
     "id": "D.20.179.140",
     "company_name": "Tilto Spa",
     "name": "Andrea Ferrante",
     "address": "via roma, 133",
     "code": "andrea_33",    
     "tipo_soggetto": "1",
     "tax_code": "",
     "vat_number":"000999888",     
     "province": "NA",
     "postcode": "80036",
     "city": "Palma Campania",
     "country": "IT"
     },
....
]
	

Request parameters

Campo Tipo Descrizione Vincoli

id

String

LAB ID of Suppliers

obbligatorio

company_name

String

Business name

Required

name

String

First name - surname

Optional

address

String

Address

Optional

code

String

Other Code

Optional

tax_code

String

Tax Code

Optional

vat_number

String

VAT Number

optional

province

String

Province (abbreviation)

optional

city

String

City

optional

postcode

String

Postal code

optional

country

String

Nation

optional

HTTP Response

HTTP/1.1 200 OK
Date: Thu, 23 May 2019 13:35:40 GMT
Content-Type: application/json
Content-Length: 96
Connection: keep-alive
x-amzn-RequestId: a4da5d82-7d5f-11e9-8897-19a42a5e3db5
x-amz-apigw-id: aI4yIG5mDoEFnGQ=
x-custom-header: header_api
X-Amzn-Trace-Id: Root=1-5ce6a1a7-6fa0dac81921f322a865c51c;Sampled=0
{
   "code": true,
   "message": "Api conclusa",
   "response":    {
      "info":       [
         "D.20.381.469",
         "D.20.381.470"
      ],
       "result":       {
         "errors": 0,
         "error_messages": [],
         
      }
   }
}
							

Response parameters

Field Type Description

code

Boolean

Exit code

message

String

response

Json

Final result

response.info

Array

IDs of new elements

response.errors

Integer

number of errors

response.error_messages

Array JSON

Details af errors

Warehouse

This section lists all available methods for managing the Warehouse resource, understood as inventory progressive management, such as existence, ordered by customers, etc.

M1. Get Warehouse Data

GET https://lnii51g4m5.execute-api.eu-west-1.amazonaws.com/[fase]/warehouse

The function returns the list of ITEM MOVEMENTS, as well as the various inventory progressives associated with them.

HTTP Request

GET https://lnii51g4m5.execute-api.eu-west-1.amazonaws.com/[fase]/warehouse HTTP/1.1
Accept-Encoding: gzip,deflate
x-api-key: Your-API-Key
Connection: Keep-Alive
								

Request parameter

Fields Type Description Constraints

page_size

Integer

Max numbers of items for page

Greater than zero

Default: 25 - MAX: 100

page_number

Integer

Indicates the page number requested by the user. Useful for any paginations

Greater than zero

Default: 1

id

String

Article ID

Optional

sku

String

Article primary code

Optional

cod2

String

Article secondary code

Optional

deposit

String

Deposit ID

Optional

lastUpdate

Date

Search by last update. Indicates the start date of the search

optional - format yyyy-mm-dd

HTTP response


{
   "code": true,
   "message": "API conclusa",
   "tot_record": 723,
   "page_number": 1,
   "pagesize": 10,
   "response":    [
            {
         "id": "C.2019.20.477",
         "sku": "andrew",
         "is_lot_item": 0,
         "is_expired_date_item": 0,
         "ean": "andrew",
         "brand": " ",
         "description": "andrew",
         "location": "C.19.9.4:;",
         "stock": 0,
         "min_stock": 0,
         "purchase_order": 3,
         "customer_order": 227,
         "loading": 0,
         "unloading": 0,
         "transfer_out": 0,
         "transfer_in": 0,
         "inv_out": 0,
         "inv_in": 0
      },
      ........
   ]
}

Parametri risposta

Field Type Description

code

Boolean

Exit code

message

String

Result Informations

tot_record

Integer

Total items found

page_number

Integer

Page number

page_size

Integer

Total items per page

response

Array Json

Set of items found

Document

This section lists all the methods available for managing the Document resource.

DOC1. Get Documents

GET https://lnii51g4m5.execute-api.eu-west-1.amazonaws.com/[fase]/document/get

The function returns the list of document MBE LAB.

HTTP Request

GET https://lnii51g4m5.execute-api.eu-west-1.amazonaws.com/[fase]/document/get  HTTP/1.1
Accept-Encoding: gzip,deflate
x-api-key: Your-API-Key
Connection: Keep-Alive
								

Request parameters

Field Type Description Constraints

page_size

Integer

Number of items for page

Greater than zero

Default: 10 - MAX: 10

page_number

Integer

Indicates the page number requested by the user. Useful for any paginations

Greater than zero

Default: 1

type

String

type of document

Required
allowed values:
'OC' :Shipping Order
'OF' :Purchase Order
'SDN':Shipping DN
'LDN':Load DN
'DRC':DN return from Recipient
'DRF':DN return to Supplier

id

String

ID of document

Optional

num

String

Number fo document

optional

recipient_id

String

ID of Recipient

optional

operator

String

Operator Name or Surname

optional

date_from

Date

Search by document date. Indicates the start date of the search

optional - format yyyy-mm-dd

date_to

Date

Search by document date. Indicates the end date of the search

optional - format yyyy-mm-dd

lastUpdate

Date

Search by last update of document. Indicates the start date of the search

optional - format yyyy-mm-dd

creation_time

Date

Search by creation date of document. Indicates the start date of the search

optional - format yyyy-mm-dd

related_doc

String

Related Document number

Optional

serial

String

Serial number

Optional

state

Integer

Search by document status.
Indicates the status of the document:
state=0 - Draft order
state=1 - Order confirmed
state=2 - Deleted Order
state=3 - Order fulfilled

optional

Risposta HTTP

HTTP/1.1 200 OK
Date: Tue, 21 Feb 2020 14:48:12 GMT
Content-Type: application/json
Content-Length: 586
Connection: keep-alive
x-amzn-RequestId: b9f603a9-815d-11e9-aa93-a7efb415d2d8
x-amz-apigw-id: aZog7HzfjoEFVRQ=
x-custom-header: header_api
X-Amzn-Trace-Id: Root=1-5ced546c-1a89158fd4dad7b268d39960;Sampled=0

{
   "code": true,
   "message": "Api conclusa",
   "tot_record": 57,
   "page_number": 1,
   "page_size": 25,
   "response":[{
   "shipping_order":{
         "id": "D.20.179.556",
         "num": "API/37",
         "deposit": "D.20.323.1",
         "department_id": "D.21.497.15",
         "date": "2020-09-03",
         "reason": "Spedizione da logistica",
         "transport": "Vettore",
         "port_shipment": "Franco",
         "note": "",
         "operator": "Admin Admin",
         "shipping_packages": 1,
         "tracking_number": null,
         "tracking_number_mbe": null,
         "state": 1,
         "state_description": "Confirmed",
         "working_state": "5",
         "working_state_description": "In picking",
         "creation_time": "2023-03-03T10:17:52.000Z",
         "recipient":          {
            "id": "D.20.5.2",
            "company_name": "Modifica 3333",
            "vat_number": null,
            "tax_code": "",
            "address": "via roma",
            "province": null,
            "postcode": null,
            "city": "Palma Campania",
            "country": null
         },
        "destination":       {
         "company_name": "ciao",
         "destination_address": "address",
         "destination_city": "Nola",
         "destination_postalcode": "8003",
         "destinazion_province": "priv",
         "destination_country": "LT - Lituania"
      },
      "related_doc":       [
                  {
            "id": "D.22.497.1438",
            "num": "C/17",
            "date": "2022-04-08",
            "doc_type": "OC"
         },
                  {
            "id": "EF83L07428.195",
            "num": "EF83L07428.195",
            "date": "2022-04-08",
            "doc_type": "RIS"
         }
      ],
         "products":[
            {
               "id": "C.2019.20.477",
               "sku": "andrew",
               "description": "andrew",
               "qnt": 55,
               "lot": "",
               "expire_date": "",
               "serial": "",
               "id_container": "998e02a8-ff47-11ef-902f-027220a25dc5",
               "container_name": "U25_463",
               "qnt_init": 55,
               "state": 1,
                "delivery_date": "2021-07-26"
            },
            {
               "id": "C.2019.20.477",
               "sku": "andrew",
               "description": "andrew",
               "qnt": 1,
               "lot": "",
               "expire_date": "",
               "serial": "",
               "id_container": "998e02a8-ff47-11ef-902f-027220a25dc5",
               "container_name": "U25_463",
               "qnt_init": 1,
               "state": 1,
                "delivery_date": "2021-07-26"
            },
            ......
         ]
      }
    },
          ......  
    ]
    
								

Response parameters

Field Type Description

code

Boolean

Exit code

message

String

Result information

tot_record

Integer

Total item foud

page_number

Integer

Page number

page_size

Integer

tot record for page

response

id

String

Document ID

num

String

Document number

deposit

String

Deposit ID (rif. API Dep1)

department_id

String

Department ID (rif. API Depart1)

date

String

Date of document

reason

String

Document reason

transport

String

Type of transport

port_shipment

String

Port of goods

note

String

Notes to the document

operator

String

Operator name

shipping_packages

Integer

Number of packages in the document

tracking_number

String

Courier Tracking number

tracking_number_mbe

String

MBE Tracking number

state

Integer

Document state

state_description

String

Description of state

working_state

Integer

Document working state id

working_state_description

String

Description of working state

Recipient fields

id

String

Recipient ID (rif API D1)

company_name

String

Recipient Business Name (a new recipient will be created if it does not exist in the system)

vat_number

String

Vat number

tax_code

String

Tax code

address

String

Recipient address

province

String

Recipient province abbreviation

city

String

Recipient City

postcode

String

Recipient CAP

country

String

Recipient country

Destination fields

company_name

String

Destination Business Name

address

String

Destination address

postcode

String

Destination CAP

city

String

DestinationCity

province

String

Destination province abbreviation

country

String

Destination country

Related documents (Array JSON)

id

String

Related Document ID

num

String

Related Document Number

date

String

Related Document Date

doc_type

String

Related Document Type

Packages (Array JSON)

id

String

Package ID

num

String

Package Number

name

String

Package name

appearance

String

Package physical appearance

tracking

String

Package tracking number

width

Integer

Package width

height

Integer

Package height

depth

Integer

Package depth

weight

Integer

Package weight

Containers (Array JSON)

id

String

Container ID

num

String

Container Number

name

String

Container name

appearance

String

Container physical appearance

tracking

String

Tracking number

width

Integer

Container width

height

Integer

Container height

depth

Integer

Container depth

weight

Integer

Container weight

sscc_gs1

String

GS1 code

tags

String

Container tags

Products Fields (Array JSON)

id

String

article ID

sku

String

Primary code of article

description

String

Description of article

qnt

Float

Residual quantity to be processed

lot

String

Lot of article

expire_date

String

Expired date

serial

String

Serial number

id_container

String

Id container

container_name

String

Container name

qnt_init

String

Initial quantity of article

state

String

Indicates the status of article into document:
state=1 - confirmed or partial filled
state=3 - fullfilled

delivery_date

Date

Delivery date

related_doc_id

String

Logilize related order ID

related_doc_num

String

Logilize related order number

related_doc_date

String

Logilize related order date

DOC2. Create Shipping Orders

POST https://lnii51g4m5.execute-api.eu-west-1.amazonaws.com/[fase]/document/create

The function creates Shipping Orders in MBE LAB. (max 25 orders for request)

The recipient of the document will first be searched for among those present at the system using the ID field of recipient (if valued in demand) or all other data fields sent as the search keys.

if it does not exist, the Recipient will be created

HTTP Request

POST https://lnii51g4m5.execute-api.eu-west-1.amazonaws.com/[fase]/document/create  HTTP/1.1
Accept-Encoding: gzip,deflate
x-api-key: Your-API-Key
Connection: Keep-Alive
[{
"shipping_order":{
         "elab_mode":"async",
	 "num": "API/40",
         "deposit": "D.20.323.1",
         "department_id": "D.21.497.15",
         "date": "2020-09-03",
         "type": "OC",
         "reason": "Spedizione da logistica",
         "transport": "sender",
         "port_shipment": "Franco",
         "note": "",
         "shipping_packages": 1,
         "mbe_service_id": 1,
         "extraServices": [{"service_id": 2,"service_value": 21.99}],
         "tracking_number":"1234567890abcd",
         "recipient":{
                    "id": "D.20.5.2",
                    "company_name": "Andrea modifica test con contatti 3 ",
                    "name": "Andrea ",
                    "vat_number": "",
                    "tax_code": "",
                    "address": "",
                    "province": "",
                    "city": "",
                    "postcode": "",
                    "country": "",
                    "contacts":[{"type":"email","value":"andrea.ferrante@advisssssse.it"},{"type":"telefono","value":"3391234567"}]
                    },
	"destination":{
                    "company_name": "Andrea modifica test con contatti 3 ",
                    "address": "",
                    "province": "",
                    "city": "",
                    "postcode": "",
                    "country": "",
                    "note": "",
                    "name": "",
                    "phone": "",
                    "email": ""
                    },
	"products":[
                    {            
                    "sku": "andrew",
                    "qnt": 55,
                    "lot": "",
                    "expire_date": "",
                    "delivery_date": "2021-07-26",
                    "note": "Product note",
                    "seriale":"0011223344"
                    },
                    {
                    "sku": "andrew",           
                    "qnt": 1,
                    "lot": "",
                    "expire_date": ""
                    "delivery_date": "2021-07-26",
                    "note": "Product note",
                    "serial":""
                    },
                ...
                ]
                },
.....
}
]

								

Request parameter

Insert json format request message body

Field Type Description Constraints
Fields for shipping_order

elab_mode

String

Elaboration mode. Accepted values: sync, async

Optional. default: sync

num

String

Document number

Required

deposit

String

Deposit ID (rif. API Dep1)

Required

department_id

String

Department ID (rif. API Depart1)

Optional

date

String

Date of document

Required (format: YYYY-MM-DD)

type

String

Type of document

Set with 'OC'

reason

String

Document reason

Optional

transport

String

Type of transport

Optional - Accepted values: recipient, sender, carrier

port_shipment

String

Port of goods

Optional

note

String

Notes to the document

optional

shipping_packages

Integer

Number of packages in the document

Optional

mbe_service_id

Integer

Number of MBE service

Optional
1 - MBE Economy
2 - MBE Standard
4 - MBE Express
5 - MBE Morning
6 - MBE Early Morning
7 - MBE Pony Express
9 - MBE Capi Appesi Large
10 - MBE Capi Appesi Small
11 - MBE Delivery Point

extraServices

Array of Json

extra services

Optional
(type int) service_id: ID of extra services. (set with 2 for Mark service)
(type float) service_value: value of service (must be more than zero)

tracking_number

String

MBE Tracking number

optional

Recipient fields

id

String

Recipient ID (rif API D1)

If valued, it retrieves the recipient's address data through their ID

company_name

String

Recipient's Business Name (a new recipient will be created if it does not exist in the system)

Required if not valued recipient ID field

name

String

First name - surname

Optional

vat_number

String

Vat number

Optional

tax_code

String

Tax code

optional

address

String

Recipient address

Required if not valued recipient ID field

province

String

Recipient's province abbreviation

Optional

city

String

Recipient's City

Required if not valued recipient ID field

postcode

String

Recipient's CAP

Required if not valued recipient ID field

country

String

Recipient's country

Required if not valued recipient ID field (ISO-2 Format)

contacts

Array JSON

Recipient's contact list (will be created if they don't exist)

type: type of contact (e.g. email, phone, mobile phone)

value: contact value (for phone or mobile phone suggested number only format)

optional (phone or mobile phone is Required if Recipient's country is different than "IT")

Field of Destination (Optional)

company_name

String

The company name of the intended use (a new destination will be created for the recipient if it does not exist in the system)

Required

address

String

destination address

Required

province

String

Sigla provincia destinazione

Optional

city

String

city of destination

Required

postcode

String

Post code

Required

country

String

Country of destination

Required (ISO-2 format)

name

String

Name of destination

optional

phone

String

phone number of destination (suggested number only format)

Required only if Country is different than "IT"

email

String

email of destination

optional

note

String

Delivery Annotations

optional

Field of Order Contract (Optional)

id

Number

Contract ID

Optional

code

String

Contract code

Optional

Products Fields (Array JSON)

sku

String

Primary code of article

Required

qnt

Float

Quantity of article

Required (decimal separator '.')

lot

String

Lot of article

Required if lot article

expire_date

Date

Expired date

Required if lot/exipred article (format: YYYY-MM-DD)

delivery_date

Date

Delivery date of product

Optional (format: YYYY-MM-DD)

note

String

Article Annotations

optional

serial

Serial number

String

Optional

HTTP Response

HTTP/1.1 200 OK
Date: Tue, 21 Feb 2020 14:48:12 GMT
Content-Type: application/json
Content-Length: 586
Connection: keep-alive
x-amzn-RequestId: b9f603a9-815d-11e9-aa93-a7efb415d2d8
x-amz-apigw-id: aZog7HzfjoEFVRQ=
x-custom-header: header_api
X-Amzn-Trace-Id: Root=1-5ced546c-1a89158fd4dad7b268d39960;Sampled=0

{
   "code": true,
   "message": "Api conclusa",
   "response":    {
      "info": ["D.20.179.558"],
      "result":       {
         "errors": 0,
         "error_messages": [],
         
      }
   }
}
								

Response parameter for elab_mode sync

Field Type Description

code

Boolean

Exit code

message

String

Result information

response

Json

Set of items found

response.info

Array

Array of IDs Document created

response.errors

Integer

number of errors

response.error_messages

Array JSON

Errors messagges

Response parameter for elab_mode async

Field Type Description

code

Boolean

Exit code

message

String

result information

response

Json

Result container

response.elabId

Integer

ID of elaboration

DOC3. Update Shipping Orders

POST https://lnii51g4m5.execute-api.eu-west-1.amazonaws.com/[fase]/document/update

The function updates and creates if there are no Shipping Orders in MBE LAB. (max 25 orders for request)

HTTP Request

POST https://lnii51g4m5.execute-api.eu-west-1.amazonaws.com/[fase]/document/update  HTTP/1.1
Accept-Encoding: gzip,deflate
x-api-key: Your-API-Key
Connection: Keep-Alive
[{
"shipping_order":{
	 "num": "API/40",
         "deposit": "D.20.323.1",
         "department_id": "D.21.497.15",
         "date": "2020-09-03",
         "type": "OC",
         "reason": "Spedizione da logistica",
         "transport": "sender",
         "port_shipment": "Franco",
         "note": "",
         "shipping_packages": 1,
         "mbe_service_id": 1,
         "extraServices": [{"service_id": 2,"service_value": 21.99}],
         "tracking_number":"1234567890abcd",
         "recipient":{
			 "id": "D.20.5.2",
			 "company_name": "Andrea modifica test con contatti 3 ",
			 "name": "Andrea",
			 "vat_number": "",
			 "tax_code": "",
			 "address": "",
			 "province": "",
			 "city": "",
			 "postcode": "",
			 "country": "",
			 "contacts":[{"type":"email","value":"andrea.ferrante@advisssssse.it"},{"type":"telefono","value":"3391234567"}]
		},
		"destination":{
			 "company_name": "Andrea modifica test con contatti 3 ",
			 "address": "",
			 "province": "",
			 "city": "",
			 "postcode": "",
			 "country": "",
                         "note": "",
                         "name": "",
                         "phone": "",
                         "email": ""
		},
		"products":[
		{            
            "sku": "andrew",
            "qnt": 55,
            "lot": "",
            "expire_date": "",
            "delivery_date": "2021-07-26",
            "note": "Product note",
            "serial":"aabbccdd"
         },
                  {            
            "sku": "andrew",           
            "qnt": 1,
            "lot": "",
            "expire_date": "",
            "delivery_date": "2021-07-26",
            "note": "Product note",
            "serial":"aaabbbcccddd"
         },
...
		]
}

}]

								

Request parameter

Insert json format request message body

Field Type Description Constraints
Fields for shipping_order

elab_mode

String

Elaboration mode. Accepted values: sync, async

Optional. default: sync

id

String

Document ID

Required

num

String

Document number

Required

deposit

String

Deposit ID (rif. API Dep1)

Required

department_id

String

Department ID (rif. API Depart1)

Optional

date

String

Date of document

Required (format: YYYY-MM-DD)

type

String

Type of document

Set with 'OC'

reason

String

Document reason

Optional

transport

String

Type of transport

Optional - Accepted values: recipient, sender, carrier

port_shipment

String

Port of goods

Optional

note

String

Notes to the document

optional

shipping_packages

Integer

Number of packages in the document

Optional

mbe_service_id

Integer

Number of MBE service

Optional
1 - MBE Economy
2 - MBE Standard
4 - MBE Express
5 - MBE Morning
6 - MBE Early Morning
7 - MBE Pony Express
9 - MBE Capi Appesi Large
10 - MBE Capi Appesi Small
11 - MBE Delivery Point

extraServices

Array of Json

extra services

Optional
(type int) service_id: ID of extra services. (set with 2 for Mark service)
(type float) service_value: value of service (must be more than zero)

tracking_number

String

MBE Tracking number

optional

Recipient fields

id

String

Recipient ID (rif API D1)

If valued, it retrieves the recipient's address data through their ID

company_name

String

Recipient's Business Name (a new recipient will be created if it does not exist in the system)

Required if not valued recipient ID field

name

String

First name - surname

Optional

vat_number

String

Vat number

Optional

tax_code

String

Tax code

optional

address

String

Recipient address

Required if not valued recipient ID field

province

String

Recipient's province abbreviation

Optional

city

String

Recipient's City

Required if not valued recipient ID field

postcode

String

Recipient's CAP

Required if not valued recipient ID field

country

String

Recipient's country

Required if not valued recipient ID field (ISO-2 format)

contacts

Array JSON

Recipient's contact list (will be created if they don't exist)

type: type of contact (e.g. email, phone, mobile phone)

value: contact value

optional

Field of Destination (Optional)

company_name

String

The company name of the intended use (a new destination will be created for the recipient if it does not exist in the system)

Required

address

String

destination address

Required

province

String

Sigla provincia destinazione

Opzionale

city

String

city of destination

Required

postcode

String

Post code

Required

country

String

Nation of destination

Required (ISO-2 format)

name

String

Name of destination

optional

phone

String

phone number of destination

optional

email

String

email of destination

optional

note

String

Delivery Annotations

optional

Field of Order Contract (Optional)

id

Number

Contract ID

Optional

code

String

Contract code

Optional

Products Fields (Array JSON)

sku

String

Primary code of article

Required

qnt

Float

Quantity of article

Required (decimal separator '.')

lot

String

Lot of article

Required if lot article

expire_date

Date

Expired date

Required if lot/exipred article (format: YYYY-MM-DD)

delivery_date

Date

Delivery date of product

Optional (format: YYYY-MM-DD)

note

String

Article Annotations

optional

serial

Serial number

String

Optional

HTTP Response

HTTP/1.1 200 OK
Date: Tue, 21 Feb 2020 14:48:12 GMT
Content-Type: application/json
Content-Length: 586
Connection: keep-alive
x-amzn-RequestId: b9f603a9-815d-11e9-aa93-a7efb415d2d8
x-amz-apigw-id: aZog7HzfjoEFVRQ=
x-custom-header: header_api
X-Amzn-Trace-Id: Root=1-5ced546c-1a89158fd4dad7b268d39960;Sampled=0

{
   "code": true,
   "message": "Api conclusa",
   "response":    {
      "info": ["D.20.179.558"],
      "result":       {
         "errors": 0,
         "error_messages": [],
         
      }
   }
}
								

Response parameter for elab_mode sync

Field Type Description

code

Boolean

Exit code

message

String

Result information

response

Json

Set of items found

response.info

Array

Array of IDs Document created

response.errors

Integer

number of errors

response.error_messages

Array JSON

Errors messagges

Response parameter for elab_mode async

Field Type Description

code

Boolean

Exit code

message

String

result information

response

Json

Result container

response.elabId

Integer

ID of elaboration

DOC4. Get Purchase Orders

GET https://lnii51g4m5.execute-api.eu-west-1.amazonaws.com/[fase]/document/get

The function returns the list of Purchase Orders in MBE LAB.

Richiesta HTTP

GET https://lnii51g4m5.execute-api.eu-west-1.amazonaws.com/[fase]/document/get  HTTP/1.1
Accept-Encoding: gzip,deflate
x-api-key: Your-API-Key
Connection: Keep-Alive

Request parameters

Field Type Description Constraints

page_size

Integer

Number of items for page

Greater than zero

Default: 25 - MAX: 100

page_number

Integer

Indicates the page number requested by the user. Useful for any paginations

Maggiore di zero

Default: 1

type

String

type of document

obbligatorio - volori ammessi: 'OF'

id

String

ID of document

Optional

num

String

Number fo document

optional

supplier_id

String

ID of Supplier

optional

operator

String

Operator Name or Surname

optional

date_from

Date

Search by document date. Indicates the start date of the search

optional - format yyyy-mm-dd

date_to

Date

Search by document date. Indicates the end date of the search

optional - format yyyy-mm-dd

lastUpdate

Date

Search by last update of document. Indicates the start date of the search

optional - format yyyy-mm-dd

state

Integer

Search by document status.
Indicates the status of the document:
state=0 - Draft order
state=1 - Order confirmed
state=3 - Order fulfilled

optional

HTTP Response

HTTP/1.1 200 OK
Date: Tue, 21 Feb 2020 14:48:12 GMT
Content-Type: application/json
Content-Length: 586
Connection: keep-alive
x-amzn-RequestId: b9f603a9-815d-11e9-aa93-a7efb415d2d8
x-amz-apigw-id: aZog7HzfjoEFVRQ=
x-custom-header: header_api
X-Amzn-Trace-Id: Root=1-5ced546c-1a89158fd4dad7b268d39960;Sampled=0

{
   "code": true,
   "message": "Api conclusa",
   "tot_record": 57,
   "page_number": 1,
   "page_size": 25,
   "response":[{
   "purchase_order":{
         "id": "D.20.179.556",
         "num": "API/37",
         "deposit": "D.20.323.1",
         "department_id": "D.21.497.15",
         "date": "2020-09-03",
         "reason": "Spedizione da logistica",
         "transport": "sender",
         "port_shipment": "Franco",
         "note": "",
         "operator": "Admin Admin",
         "shipping_packages": 1,
         "state": 1,
         "supplier":          {
            "id": "D.20.5.2",
            "company_name": "Modifica 3333",
            "vat_number": null,
            "tax_code": "",
            "address": "via roma",
            "province": null,
            "postcode": null,
            "city": "Palma Campania",
            "country": null
         },
         "products":[
            {
               "id": "C.2019.20.477",
               "sku": "andrew",
               "description": "andrew",
               "qnt": 55,
               "lot": "",
               "expire_date": "",
                "delivery_date": "2021-07-26"
            },
            {
               "id": "C.2019.20.477",
               "sku": "andrew",
               "description": "andrew",
               "qnt": 1,
               "lot": "",
               "expire_date": "",
                "delivery_date": "2021-07-26"
            },
            ......
         ]
      }
    },
          ......  
    ]
    
								

Response parameters

Field Type Description

code

Boolean

Exit code

message

String

Result information

tot_record

Integer

Total item foud

page_number

Integer

Page number

page_size

Integer

tot record for page

response

Array Json

Set of items found

DOC5. Create Purchase Orders

POST https://lnii51g4m5.execute-api.eu-west-1.amazonaws.com/[fase]/document/create

The function creates Purchase Orders in MBE LAB. (max 25 orders for request)

The Supplier of the document will first be searched for among those present at the system using the ID field of supplier (if valued in demand) or all other data fields sent as the search keys.

if it does not exist, the Supplier will be created

Richiesta HTTP

POST https://lnii51g4m5.execute-api.eu-west-1.amazonaws.com/[fase]/document/create  HTTP/1.1
Accept-Encoding: gzip,deflate
x-api-key: Your-API-Key
Connection: Keep-Alive
[{
"purchase_order":{
         "elab_mode":"sync",
	 "num": "API/40",
         "deposit": "D.20.323.1",
         "department_id": "D.21.497.15",
         "date": "2020-09-03",
         "type": "OF",
         "reason": "",
         "transport": "",
         "port_shipment": "",
         "note": "",
         "shipping_packages": 1,
         "supplier":{
			 "id": "D.20.5.2",
			 "company_name": "Andrea modifica test con contatti 3 ",
			 "name": "Andrea  ",
			 "vat_number": "",
			 "tax_code": "",
			 "address": "",
			 "province": "",
			 "city": "",
			 "postcode": "",
			 "country": "",
			 "contacts":[{"type":"email","value":"andrea.ferrante@advisssssse.it"},{"type":"telefono","value":"3391234567"}]
		}
                "products":[
                            {            
                           "sku": "andrew",
                           "qnt": 55,
                           "lot": "",
                           "expire_date": "",
                           "delivery_date": "2021-07-26",
                           "note": "Product note" 
                        },
                        {            
                       "sku": "andrew",           
                       "qnt": 1,
                       "lot": "",
                       "expire_date": "",
                       "delivery_date": "2021-07-26",
                       "note": "Product note" 
                    },
...
		]
}

}]

								

Request parameter

Insert json format request message body

Field Type Description Constraints
Fields for purchase_order

elab_mode

String

Elaboration mode. Accepted values: sync, async

Optional. default: sync

num

String

Document number

Required

deposit

String

Deposit ID (rif. API Dep1)

Required

department_id

String

Department ID (rif. API Depart1)

Optional

date

String

Date of document

Required (format: YYYY-MM-DD)

type

String

Type of document

Set with 'OF'

reason

String

Document reason

Optional

transport

String

Type of transport

Optional - Accepted values: recipient, sender, carrier

port_shipment

String

Port of goods

Optional

note

String

Notes to the document

optional

shipping_packages

Integer

Number of packages in the document

Optional

Supplier fields

id

String

Supplier ID (rif API D1)

If valued, it retrieves the recipient's address data through their ID

company_name

String

Supplier's Business Name (a new suppplier will be created if it does not exist in the system)

Required if not valued Supplier ID field

name

String

First name - surname

Optional

vat_number

String

Vat number

Optional

tax_code

String

Tax code

optional

address

String

Recipient address

Optional

province

String

Province abbreviation

Optional

city

String

City

Optional

postcode

String

Post Code

Optional

country

String

Supplier country

optional

contacts

Array JSON

Supplier's contact list (will be created if they don't exist)

type: type of contact (e.g. email, phone, mobile phone)

value: contact value

optional

Field of Order Contract (Optional)

id

Number

Contract ID

Optional

code

String

Contract code

Optional

Products Fields (Array JSON)

sku

String

Primary code of article

Required

qnt

Float

Quantity of article

Required (decimal separator '.')

lot

String

Lot of article

Required if lot article

expire_date

String

Expired date

Required if lot/exipred article

delivery_date

Date

Delivery date of product

Optional (format: YYYY-MM-DD)

note

String

Article Annotations

optional

HTTP Response

HTTP/1.1 200 OK
Date: Tue, 21 Feb 2020 14:48:12 GMT
Content-Type: application/json
Content-Length: 586
Connection: keep-alive
x-amzn-RequestId: b9f603a9-815d-11e9-aa93-a7efb415d2d8
x-amz-apigw-id: aZog7HzfjoEFVRQ=
x-custom-header: header_api
X-Amzn-Trace-Id: Root=1-5ced546c-1a89158fd4dad7b268d39960;Sampled=0

{
   "code": true,
   "message": "Api conclusa",
   "response":    {
      "info": ["D.20.179.558"],
      "result":       {
         "errors": 0,
         "error_messages": [],
         
      }
   }
}
								

Response parameter for elab_mode sync

Field Type Description

code

Boolean

Exit code

message

String

Result information

response

Json

Set of items found

response.info

Array

Array of IDs Document created

response.errors

Integer

number of errors

response.error_messages

Array JSON

Errors messagges

Response parameter for elab_mode async

Field Type Description

code

Boolean

Exit code

message

String

result information

response

Json

Result container

response.elabId

Integer

ID of elaboration

DOC6. Update Purchase Order

POST https://lnii51g4m5.execute-api.eu-west-1.amazonaws.com/[fase]/document/update

The function update or create if not exists Purchase Orders in MBE LAB. (max 25 orders for request)

The Supplier of the document will first be searched for among those present at the system using the ID field of supplier (if valued in demand) or all other data fields sent as the search keys.

if it does not exist, the Supplier will be created

HTTP Request

POST https://lnii51g4m5.execute-api.eu-west-1.amazonaws.com/[fase]/document/update  HTTP/1.1
Accept-Encoding: gzip,deflate
x-api-key: Your-API-Key
Connection: Keep-Alive
[{
"purchase_order":{
	 "id": "D.20.223.12",
	 "num": "API/40",
         "deposit": "D.20.323.1",
         "department_id": "D.21.497.15",
         "date": "2020-09-03",
         "type": "OF",
         "reason": "",
         "transport": "",
         "port_shipment": "",
         "note": "",
         "shipping_packages": 1,
         "supplier":{
			 "id": "D.20.5.2",
			 "company_name": "Andrea modifica test con contatti 3 ",
			 "name": "Andrea",
			 "vat_number": "",
			 "tax_code": "",
			 "address": "",
			 "province": "",
			 "city": "",
			 "postcode": "",
			 "country": "",
			 "contacts":[{"type":"email","value":"andrea.ferrante@advisssssse.it"},{"type":"telefono","value":"3391234567"}]
		}
	"products":[
                 {            
                "sku": "andrew",
                "qnt": 55,
                "lot": "",
                "expire_date": "",
                "delivery_date": "2021-07-26",
                "note": "Product note" 
             },
             {            
            "sku": "andrew",           
            "qnt": 1,
            "lot": "",
            "expire_date": "",
            "delivery_date": "2021-07-26",
            "note": "Product note" 
         },
...
		]
}

}]

								

Request parameter

Insert json format request message body

Field Type Description Constraints
Fields for purchase_order

elab_mode

String

Elaboration mode. Accepted values: sync, async

Optional. default: sync

id

String

Document ID

Required

num

String

Document number

Required

deposit

String

Deposit ID (rif. API Dep1)

Required

department_id

String

Department ID (rif. API Depart1)

Optional

date

String

Date of document

Required (format: YYYY-MM-DD)

type

String

Type of document

Set with 'OF'

reason

String

Document reason

Optional

transport

String

Type of transport

Optional - Accepted values: recipient, sender, carrier

port_shipment

String

Port of goods

Optional

note

String

Notes to the document

optional

shipping_packages

Integer

Number of packages in the document

Optional

Supplier fields

id

String

Supplier ID (rif API D1)

If valued, it retrieves the recipient's address data through their ID

company_name

String

Supplier's Business Name (a new supplier will be created if it does not exist in the system)

Required if not valued Supplier ID field

name

String

First name - surname

Optional

vat_number

String

Vat number

Optional

tax_code

String

Tax code

optional

address

String

Recipient address

Optional

province

String

Province abbreviation

Optional

city

String

City

Optional

postcode

String

Post Code

Optional

country

String

Supplier country

optional

contacts

Array JSON

Supplier's contact list (will be created if they don't exist)

type: type of contact (e.g. email, phone, mobile phone)

value: contact value

optional

Field of Order Contract (Optional)

id

Number

Contract ID

Optional

code

String

Contract code

Optional

Products Fields (Array JSON)

sku

String

Primary code of article

Required

qnt

Float

Quantity of article

Required (decimal separator '.')

lot

String

Lot of article

Required if lot article

expire_date

String

Expired date

Required if lot/exipred article

delivery_date

Date

Delivery date of product

Optional (format: YYYY-MM-DD)

note

String

Article Annotations

optional

HTTP Response

HTTP/1.1 200 OK
Date: Tue, 21 Feb 2020 14:48:12 GMT
Content-Type: application/json
Content-Length: 586
Connection: keep-alive
x-amzn-RequestId: b9f603a9-815d-11e9-aa93-a7efb415d2d8
x-amz-apigw-id: aZog7HzfjoEFVRQ=
x-custom-header: header_api
X-Amzn-Trace-Id: Root=1-5ced546c-1a89158fd4dad7b268d39960;Sampled=0

{
   "code": true,
   "message": "Api conclusa",
   "response":    {
      "info": ["D.20.179.558"],
      "result":       {
         "errors": 0,
         "error_messages": [],
         
      }
   }
}
	

Response parameter for elab_mode sync

Field Type Description

code

Boolean

Exit code

message

String

Result information

response

Json

Set of items found

response.info

Array

Array of IDs Document created

response.errors

Integer

number of errors

response.error_messages

Array JSON

Errors messagges

Response parameter for elab_mode async

Field Type Description

code

Boolean

Exit code

message

String

result information

response

Json

Result container

response.elabId

Integer

ID of elaboration

DOC7. Delete Order

POST https://lnii51g4m5.execute-api.eu-west-1.amazonaws.com/[fase]/document/delete

The function delete Order in MP.

HTTP Request

POST https://lnii51g4m5.execute-api.eu-west-1.amazonaws.com/[fase]/document/delete  HTTP/1.1
Accept-Encoding: gzip,deflate
x-api-key: Your-API-Key
Connection: Keep-Alive
{
    "id":"X.00.00.00",
    "type":"OC"
}

Request parameter

Insert json format request message body

Field Type Description Constraints

id

String

Document ID

Required

type

String

Type of document

Required
Indicates the type of the document:
OC - Shipping Order
OF - Purchase Order
OL - Processing Order

HTTP Response

HTTP/1.1 200 OK
            Date: Tue, 21 Feb 2020 14:48:12 GMT
            Content-Type: application/json
            Content-Length: 586
            Connection: keep-alive
            x-amzn-RequestId: b9f603a9-815d-11e9-aa93-a7efb415d2d8
            x-amz-apigw-id: aZog7HzfjoEFVRQ=
            x-custom-header: header_api
            X-Amzn-Trace-Id: Root=1-5ced546c-1a89158fd4dad7b268d39960;Sampled=0

            {
               "code": true,
               "message": "Success",
               "response":    []
               }
            }

Response parameter for elab_mode sync

Field Type Description

code

Boolean

Exit code

message

String

Result information

response

Json

Not Set

Deposit

This section lists all available methods for managing the Warehouse/Goods Destination resource.

Dep1. Get Deposit

GET https://lnii51g4m5.execute-api.eu-west-1.amazonaws.com/[fase]/deposit/get

This function returns the warehouses in MBE LAB

HTTP Request

GET https://lnii51g4m5.execute-api.eu-west-1.amazonaws.com/[fase]/deposit/get HTTP/1.1
Accept-Encoding: gzip,deflate
x-api-key: Your-API-Key
Connection: Keep-Alive

Request parameters

Field Type Description Constraints

page_size

Integer

Max numbers of item for page

Greater than zero

Default: 25

page_number

Integer

Page number requested by the user, Useful for paginations

Greater than zero

Default: 1

id

String

Deposit ID

Optional

code

String

Deposit code

Optional

HTTP response

HTTP/1.1 200 OK
Date: Wed, 29 May 2019 08:08:04 GMT
Content-Type: application/json
Content-Length: 96
Connection: keep-alive
x-amzn-RequestId: e21d0833-81e8-11e9-9db8-bd50b4af1cd4
x-amz-apigw-id: ab6blG8aDoEF2zA=
x-custom-header: header_api
X-Amzn-Trace-Id: Root=1-5cee3de3-5619f42ed98b3d73cf6eee0b;Sampled=0

{
   "code": true,
   "message": "Api conclusa",
   "tot_record": 2,
   "page_number": 1,
   "page_size": 25,
   "response":    [
            {
         "id": "D.20.176.1",
         "code": 1,
         "company_name": "Meteo Spa",
         "address": " ",
         "citta": "Deposito",
         "province": " ",
         "postcode": " ",
         "country": "IT - Italia",
         "note": null,
         "deposit_type":"Picking"
      },
            {
         "id": "D.20.323.1",
         "code": 2,
         "company_name": "test",
         "address": "via",
         "citta": "Test",
         "province": " ",
         "postcode": " ",
         "country": " ",
         "note": " ",
         "deposit_type":"Multipurpose"
      },
....
   ]
}

Response parameter

Filed Type Description

code

Boolean

Exit code

message

String

Result information

tot_record

Integer

total number of record found

page_number

Integer

page number

page_size

Integer

Total item for page

response

Array Json

Result container

Department

This section lists all available methods for managing the Departments .

Depart1. Get Department

GET https://lnii51g4m5.execute-api.eu-west-1.amazonaws.com/[fase]/department/get

This function returns the Departments in MBE LAB

HTTP Request

GET https://lnii51g4m5.execute-api.eu-west-1.amazonaws.com/[fase]/department/get HTTP/1.1
Accept-Encoding: gzip,deflate
x-api-key: Your-API-Key
Connection: Keep-Alive

Request parameters

Field Type Description Constraints

page_size

Integer

Max numbers of item for page

Greater than zero

Default: 25

page_number

Integer

Page number requested by the user, Useful for paginations

Greater than zero

Default: 1

id

String

Department ID

Optional

code

String

Department code

Optional

HTTP response

HTTP/1.1 200 OK
Date: Wed, 29 May 2019 08:08:04 GMT
Content-Type: application/json
Content-Length: 96
Connection: keep-alive
x-amzn-RequestId: e21d0833-81e8-11e9-9db8-bd50b4af1cd4
x-amz-apigw-id: ab6blG8aDoEF2zA=
x-custom-header: header_api
X-Amzn-Trace-Id: Root=1-5cee3de3-5619f42ed98b3d73cf6eee0b;Sampled=0

{
   "code": true,
   "message": "Api conclusa",
   "tot_record": 2,
   "page_number": 1,
   "page_size": 25,
   "response":    [
            {
         "id": "D.21.497.15",
         "code": depart1,
         "description": "Department 1"         
      },
            {
         "id": "D.21.497.16",
         "code": 2,
         "company_name": "Department 2"         
      },
....
   ]
}

Response parameter

Filed Type Description

code

Boolean

Exit code

message

String

Result information

tot_record

Integer

total number of record found

page_number

Integer

page number

page_size

Integer

Total item for page

response

Array Json

Result container

Elaboration

This section lists all the methods available for managing asynchronous processing.

Elab1. Get Elaboration

GET https://lnii51g4m5.execute-api.eu-west-1.amazonaws.com/[fase]/elab

This function returns the processing data

HTTP Request

GET https://lnii51g4m5.execute-api.eu-west-1.amazonaws.com/[fase]/elab HTTP/1.1
Accept-Encoding: gzip,deflate
x-api-key: Your-API-Key
Connection: Keep-Alive

Request Parameters

Field Type Description Constraints

id

Integer

Elaboration ID

Required

Risposta HTTP

HTTP/1.1 200 OK
Date: Wed, 29 May 2019 08:08:04 GMT
Content-Type: application/json
Content-Length: 96
Connection: keep-alive
x-amzn-RequestId: e21d0833-81e8-11e9-9db8-bd50b4af1cd4
x-amz-apigw-id: ab6blG8aDoEF2zA=
x-custom-header: header_api
X-Amzn-Trace-Id: Root=1-5cee3de3-5619f42ed98b3d73cf6eee0b;Sampled=0

{
   "code": true,
   "message": "Api conclusa",
   "response": [   {
      "id": 122,
      "timestamp_start": "2021-03-05T09:50:46.000Z",
      "timestamp_end": "2021-03-05T09:50:49.000Z",
      "state": 1,
      "input_params": "[{\"shipping_order\":{\"elab_mode\":\"async\",\"num\":\"API/51\",\"deposit\":\"D.20.323.1\",\"date\":\"2021-03-05\",\"type\":\"OC\",\"reason\":\"Spedizione da logistica\",\"transport\":\"Vettore\",\"port_shipment\":\"Franco\",\"note\":\"\",\"shipping_packages\":1,\"recipient\":{\"id\":\"D.20.5.2\",\"company_name\":\"Andrea modifica test con contatti 3 \",\"vat_number\":\"\",\"tax_code\":\"\",\"address\":\"\",\"province\":\"\",\"city\":\"\",\"postcode\":\"\",\"country\":\"\",\"contacts\":[{\"type\":\"email\",\"value\":\"andrea.ferrante@advisssssse.it\"},{\"type\":\"telefono\",\"value\":\"3391234567\"}]},\"destination\":{\"company_name\":\"Andrea modifica test con contatti 3 \",\"address\":\"\",\"province\":\"\",\"city\":\"\",\"postcode\":\"\",\"country\":\"\"},\"products\":[{\"sku\":\"ART1\",\"qnt\":55,\"lot\":\"\",\"expire_date\":\"\"},{\"sku\":\"ART3\",\"qnt\":1,\"lot\":\"\",\"expire_date\":\"\"}]}}]",
      "output_params": "{\"info\":[\"D.21.179.2262\"],\"result\":{\"errori\":0,\"inseriti\":0,\"aggiornati\":1,\"esistenti\":0,\"ignorati\":0,\"totali\":1,\"desc_errori\":[],\"desc_esistenti\":[]}}"
   }]
}

response parmeters

Field Type Description

code

Boolean

Exit code

message

String

Result informations

response

Array Json

Elaboration

response.id

Integer

Elaboration ID

response.state

Integer

Elaboration status:
state=0 - In process
state=1 - Terminated

response.timestamp_start

DateTime

Start timestamp

response.timestamp_end

DateTime

End timestamp (NULL if state = 0)

response.input_params

JSON String

Request parameters

response.output_params

JSON String

Response parameters

Serial

This section lists all the methods available for managing asynchronous processing.

Ser1. Get Serial

GET https://lnii51g4m5.execute-api.eu-west-1.amazonaws.com/[fase]/serial

This function returns the processing data

HTTP Request

GET https://lnii51g4m5.execute-api.eu-west-1.amazonaws.com/[fase]/serial HTTP/1.1
Accept-Encoding: gzip,deflate
x-api-key: Your-API-Key
Connection: Keep-Alive

Request Parameters

Field Type Description Constraints

page_size

Integer

Max numbers of item for page

Greater than zero

Default: 25

page_number

Integer

Page number requested by the user, Useful for paginations

Greater than zero

Default: 1

id_article

String

Lab Article ID

Optional

Risposta HTTP

HTTP/1.1 200 OK
Date: Wed, 29 May 2019 08:08:04 GMT
Content-Type: application/json
Content-Length: 96
Connection: keep-alive
x-amzn-RequestId: e21d0833-81e8-11e9-9db8-bd50b4af1cd4
x-amz-apigw-id: ab6blG8aDoEF2zA=
x-custom-header: header_api
X-Amzn-Trace-Id: Root=1-5cee3de3-5619f42ed98b3d73cf6eee0b;Sampled=0

{
   "code": true,
   "message": "Api conclusa",
   "response": [
            {
         "id": "EE295I5094.415",
         "id_article": "EE295I5094.345",
         "serial": "**STMP290620212194_1002",
         "location": "0.G.9.1"
      },
            {
          "id": "EE295I5094.424",
         "id_article": "EE295I5094.345",
         "serial": "**STMP290620212194_1003",
         "location": "0.G.9.1"
      },
....
   ]
}

response parmeters

Field Type Description

code

Boolean

Exit code

message

String

Result informations

response

Array Json

Elaboration

response.id

Integer

Serial Lab ID

response.id_article

String

Article Lab ID

response.serial

String

Serial code

response.location

String

location Code