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 |
---|---|
|
Standard response for successful HTTP requests. |
|
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 |
|
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
[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 |
---|---|---|---|
|
|
How many maximum results to return |
Greater than zero Default: 25 |
|
|
Page number requested by the user. Useful for any paginations |
Greater than zero Default: 1 |
|
|
Article identification |
Optional |
|
|
Article code |
Optional |
|
|
Article barcode |
Optional |
|
|
Article subcode |
Optional |
|
|
Article manufacturer code |
Optional |
|
|
Articolo description |
Optional |
|
|
Article Brand |
Optional |
|
|
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 |
---|---|---|
|
|
exit value |
|
|
Any information that produced the 'result' |
|
|
Total items found |
|
|
Page number |
|
|
Items for page |
|
|
Set of items |
A2. Create Articles
[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 |
---|---|---|---|
|
|
The primary code of the item. Also useful for verifying the existence of a duplicate |
Required |
|
|
Barcode |
Default: empty string |
|
|
Simple or variant item type |
Optional. default value [s] - accepted values [s,v,k,kp] |
|
|
Article subcode |
Default: empty string |
|
|
Article manufacturer code |
Default: empty string |
|
|
Brand |
Default: empty string |
|
|
Description of the article |
Default: empty string |
|
|
Article category |
Default: empty string |
|
|
Units of measurement of the article |
Default: NR (Number) |
|
|
Alternative / secondary unit of measure of the article |
Default: empty string |
|
|
Number of pieces per package of the item |
Default: 1 |
|
|
Cost of article from supplier |
Default: 0 |
|
|
Article Weight |
Default: 0 |
|
|
Article Height |
Default: 0 |
|
|
Article width |
Default: 0 |
|
|
Article depth |
Default: 0 |
|
|
Minimum stock value to set to item |
Default: 0 |
|
|
is a serial item |
Default: 0 |
|
|
is a lot item |
Default: 0 |
|
|
is a lot/expiration item |
Default: 0 |
|
|
List of components of KIT |
Required if type=K or type=KP |
|
|
Package Weight |
Default: 0 |
|
|
Package Height |
Default: 0 |
|
|
Package width |
Default: 0 |
|
|
Package depth |
Default: 0 |
|
|
Package EAN |
Default: empty string |
|
|
Set with 1 if you want use volume of package |
Default: 0 - accepted values [0,1] |
|
|
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 |
---|---|---|
|
|
exit code |
|
|
Any information that produced the result |
|
|
Result container |
|
|
Item IDs created |
|
|
Number of errors encountered |
|
|
List of error messages |
A3. Update Articles
[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 |
---|---|---|---|
|
|
LAB ID Document |
Required |
|
|
The primary code of the item. Also useful for verifying the existence of a duplicate |
Required |
|
|
Barcode |
Default: empty string |
|
|
Simple or variant item type |
Optional. default value [s] - accepted values [s,v,k,kp] |
|
|
Article subcode |
Default: empty string |
|
|
Article manufacturer code |
Default: empty string |
|
|
Brand |
Default: empty string |
|
|
Description of the article |
Default: empty string |
|
|
Article category |
Default: empty string |
|
|
Units of measurement of the article |
Default: NR (Number) |
|
|
Alternative / secondary unit of measure of the article |
Default: empty string |
|
|
Number of pieces per package of the item |
Default: 1 |
|
|
Cost of article from supplier |
Default: 0 |
|
|
Article Weight |
Default: 0 |
|
|
Article Height |
Default: 0 |
|
|
Article width |
Default: 0 |
|
|
Article depth |
Default: 0 |
|
|
Minimum stock value to set to item |
Default: 0 |
|
|
is a serial item |
Default: 0 |
|
|
is a lot item |
Default: 0 |
|
|
is a lot/expiration item |
Default: 0 |
|
|
List of components of KIT |
Required if type=K or type=KP |
|
|
Package Weight |
Default: 0 |
|
|
Package Height |
Default: 0 |
|
|
Package width |
Default: 0 |
|
|
Package depth |
Default: 0 |
|
|
Package EAN |
Default: empty string |
|
|
Set with 1 if you want use volume of package |
Default: 0 - accepted values [0,1] |
|
|
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 |
---|---|---|
|
|
exit code |
|
|
Any information that produced the result |
|
|
Result container |
|
|
Item IDs created |
|
|
Number of errors encountered |
|
|
List of error messages |
A4. Delete Article
[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 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 |
---|---|---|
|
|
Exit code |
|
|
Any information that produced the result |
|
|
Final result container |
Recipients
This section lists all the methods available for managing the Recipients resource.
D1. Get Recipients
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 |
---|---|---|---|
|
|
The maximum number of items to return |
Greater than zero Default: 25 - MAX: 100 |
|
|
Indicates the page number requested by the user. Useful for any paginations |
Greater than zero Default: 1 |
|
|
LAB ID of Recipient |
Optional |
|
|
External code of recipient |
Optional |
|
|
Recipient's business name |
Optional |
|
|
Tax code |
Optional |
|
|
VAT number |
Optional |
|
|
Abbreviation of the Province |
Optional |
|
|
City of the Recipient |
Optional |
|
|
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 |
---|---|---|
|
|
Exit code |
|
|
Result information |
|
|
Total items found |
|
|
Page number |
|
|
Total items per page |
|
|
Set of items found |
D2. Create Recipient
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 |
---|---|---|---|
|
|
Business name |
Required |
|
|
First name - surname |
Optional |
|
|
Address |
Optional |
|
|
Other Code |
Optional |
|
|
Enhance with 1->Business, 2->Private, 3->Public Authority |
Default: 2 |
|
|
Tax Code |
Optional |
|
|
VAT Number |
optional |
|
|
Province (abbreviation |
optional |
|
|
City |
optional |
|
|
Postal code |
optional |
|
|
Nation |
optional |
|
|
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 |
---|---|---|
|
|
Exit code |
|
|
Result informations |
|
|
Final result container |
D3. Update Recipient
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 |
---|---|---|---|
|
|
LAB ID Recipient |
|
|
|
Business name |
Required |
|
|
First name - surname |
Optional |
|
|
Address |
Optional |
|
|
Other Code |
Optional |
|
|
Enhance with 1->Business, 2->Private, 3->Public Authority |
Default: 2 |
|
|
Tax Code |
Optional |
|
|
VAT Number |
optional |
|
|
Province (abbreviation |
optional |
|
|
City |
optional |
|
|
Postal code |
optional |
|
|
Nation |
optional |
|
|
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 |
---|---|---|
|
|
Exit code |
|
|
Result informations |
|
|
Final result container |
Suppliers
This section lists all the methods available for managing the Vendor resource.
F1. Get Suppliers
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 |
---|---|---|---|
|
|
The maximum number of items to return |
Greater than zero Default: 25 - MAX: 100 |
|
|
Indicates the page number requested by the user. Useful for any paginations |
Greater than zero Default: 1 |
|
|
LAB ID of Supplier |
Optional |
|
|
Business name |
Optional |
|
|
Tax code |
Optional |
|
|
VAT number |
Optional |
|
|
Abbreviation of the Province |
Optional |
|
|
City |
Optional |
|
|
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 |
---|---|---|
|
|
Exit code |
|
|
Result information |
|
|
Total items found |
|
|
Page number |
|
|
Total items per page |
|
|
Set of items found |
F2. Create Supplier
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 |
---|---|---|---|
|
|
Business name |
Required |
|
|
First name - surname |
Optional |
|
|
Address |
Optional |
|
|
Other Code |
Optional |
|
|
Tax Code |
Optional |
|
|
VAT Number |
optional |
|
|
Province (abbreviation) |
optional |
|
|
City |
optional |
|
|
Postal code |
optional |
|
|
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 |
---|---|---|
|
|
Exit code |
|
|
|
|
|
Final result |
|
|
IDs of new elements |
|
|
number of errors |
|
|
Details af errors |
F3. Update Suppliers
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 |
---|---|---|---|
|
|
LAB ID of Suppliers |
obbligatorio |
|
|
Business name |
Required |
|
|
First name - surname |
Optional |
|
|
Address |
Optional |
|
|
Other Code |
Optional |
|
|
Tax Code |
Optional |
|
|
VAT Number |
optional |
|
|
Province (abbreviation) |
optional |
|
|
City |
optional |
|
|
Postal code |
optional |
|
|
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 |
---|---|---|
|
|
Exit code |
|
|
|
|
|
Final result |
|
|
IDs of new elements |
|
|
number of errors |
|
|
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
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 |
---|---|---|---|
|
|
Max numbers of items for page |
Greater than zero Default: 25 - MAX: 100 |
|
|
Indicates the page number requested by the user. Useful for any paginations |
Greater than zero Default: 1 |
|
|
Article ID |
Optional |
|
|
Article primary code |
Optional |
|
|
Article secondary code |
Optional |
|
|
Deposit ID |
Optional |
|
|
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 |
---|---|---|
|
|
Exit code |
|
|
Result Informations |
|
|
Total items found |
|
|
Page number |
|
|
Total items per page |
|
|
Set of items found |
Document
This section lists all the methods available for managing the Document resource.
DOC1. Get Documents
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 |
---|---|---|---|
|
|
Number of items for page |
Greater than zero Default: 10 - MAX: 10 |
|
|
Indicates the page number requested by the user. Useful for any paginations |
Greater than zero Default: 1 |
|
|
type of document |
Required |
|
|
ID of document |
Optional |
|
|
Number fo document |
optional |
|
|
ID of Recipient |
optional |
|
|
Operator Name or Surname |
optional |
|
|
Search by document date. Indicates the start date of the search |
optional - format yyyy-mm-dd |
|
|
Search by document date. Indicates the end date of the search |
optional - format yyyy-mm-dd |
|
|
Search by last update of document. Indicates the start date of the search |
optional - format yyyy-mm-dd |
|
|
Search by creation date of document. Indicates the start date of the search |
optional - format yyyy-mm-dd |
|
|
Related Document number |
Optional |
|
|
Serial number |
Optional |
|
|
Search by document status. |
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 | |
---|---|---|---|
|
|
Exit code |
|
|
|
Result information |
|
|
|
Total item foud |
|
|
|
Page number |
|
|
|
tot record for page |
|
|
|||
|
|
Document ID |
|
|
|
Document number |
|
|
|
Deposit ID (rif. API Dep1) |
|
|
|
Department ID (rif. API Depart1) |
|
|
|
Date of document |
|
|
|
Document reason |
|
|
|
Type of transport |
|
|
|
Port of goods |
|
|
|
Notes to the document |
|
|
|
Operator name |
|
|
|
Number of packages in the document |
|
|
|
Courier Tracking number |
|
|
|
MBE Tracking number |
|
|
|
Document state |
|
|
|
Description of state |
|
|
|
Document working state id |
|
|
|
Description of working state |
|
Recipient fields | |||
|
|
Recipient ID (rif API D1) |
|
|
|
Recipient Business Name (a new recipient will be created if it does not exist in the system) |
|
|
|
Vat number |
|
|
|
Tax code |
|
|
|
Recipient address |
|
|
|
Recipient province abbreviation |
|
|
|
Recipient City |
|
|
|
Recipient CAP |
|
|
|
Recipient country |
|
Destination fields | |||
|
|
Destination Business Name |
|
|
|
Destination address |
|
|
|
Destination CAP |
|
|
|
DestinationCity |
|
|
|
Destination province abbreviation |
|
|
|
Destination country |
|
Related documents (Array JSON) | |||
|
|
Related Document ID |
|
|
|
Related Document Number |
|
|
|
Related Document Date |
|
|
|
Related Document Type |
|
Packages (Array JSON) | |||
|
|
Package ID |
|
|
|
Package Number |
|
|
|
Package name |
|
|
|
Package physical appearance |
|
|
|
Package tracking number |
|
|
|
Package width |
|
|
|
Package height |
|
|
|
Package depth |
|
|
|
Package weight |
|
Containers (Array JSON) | |||
|
|
Container ID |
|
|
|
Container Number |
|
|
|
Container name |
|
|
|
Container physical appearance |
|
|
|
Tracking number |
|
|
|
Container width |
|
|
|
Container height |
|
|
|
Container depth |
|
|
|
Container weight |
|
|
|
GS1 code |
|
|
|
Container tags |
|
Products Fields (Array JSON) | |||
|
|
article ID |
|
|
|
Primary code of article |
|
|
|
Description of article |
|
|
|
Residual quantity to be processed |
|
|
|
Lot of article |
|
|
|
Expired date |
|
|
|
Serial number |
|
|
|
Id container |
|
|
|
Container name |
|
|
|
Initial quantity of article |
|
|
|
Indicates the status of article into document:
|
|
|
|
Delivery date |
|
|
|
Logilize related order ID |
|
|
|
Logilize related order number |
|
|
|
Logilize related order date |
DOC2. Create Shipping Orders
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 | |||
|
|
Elaboration mode. Accepted values: sync, async |
Optional. default: sync |
|
|
Document number |
Required |
|
|
Deposit ID (rif. API Dep1) |
Required |
|
|
Department ID (rif. API Depart1) |
Optional |
|
|
Date of document |
Required (format: YYYY-MM-DD) |
|
|
Type of document |
Set with 'OC' |
|
|
Document reason |
Optional |
|
|
Type of transport |
Optional - Accepted values: recipient, sender, carrier |
|
|
Port of goods |
Optional |
|
|
Notes to the document |
optional |
|
|
Number of packages in the document |
Optional |
|
|
Number of MBE service |
Optional
|
|
|
extra services |
Optional
|
|
|
MBE Tracking number |
optional |
Recipient fields | |||
|
|
Recipient ID (rif API D1) |
If valued, it retrieves the recipient's address data through their ID |
|
|
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 |
|
|
First name - surname |
Optional |
|
|
Vat number |
Optional |
|
|
Tax code |
optional |
|
|
Recipient address |
Required if not valued recipient ID field |
|
|
Recipient's province abbreviation |
Optional |
|
|
Recipient's City |
Required if not valued recipient ID field |
|
|
Recipient's CAP |
Required if not valued recipient ID field |
|
|
Recipient's country |
Required if not valued recipient ID field (ISO-2 Format) |
|
|
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) | |||
|
|
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 |
|
|
destination address |
Required |
|
|
Sigla provincia destinazione |
Optional |
|
|
city of destination |
Required |
|
|
Post code |
Required |
|
|
Country of destination |
Required (ISO-2 format) |
|
|
Name of destination |
optional |
|
|
phone number of destination (suggested number only format) |
Required only if Country is different than "IT" |
|
|
email of destination |
optional |
|
|
Delivery Annotations |
optional |
Field of Order Contract (Optional) | |||
|
Number |
Contract ID |
Optional |
|
String |
Contract code |
Optional |
Products Fields (Array JSON) | |||
|
String |
Primary code of article |
Required |
|
Float |
Quantity of article |
Required (decimal separator '.') |
|
String |
Lot of article |
Required if lot article |
|
Date |
Expired date |
Required if lot/exipred article (format: YYYY-MM-DD) |
|
Date |
Delivery date of product |
Optional (format: YYYY-MM-DD) |
|
|
Article Annotations |
optional |
|
|
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 |
---|---|---|
|
|
Exit code |
|
|
Result information |
|
|
Set of items found |
|
|
Array of IDs Document created |
|
|
number of errors |
|
|
Errors messagges |
Response parameter for elab_mode async
Field | Type | Description |
---|---|---|
|
|
Exit code |
|
|
result information |
|
|
Result container |
|
|
ID of elaboration |
DOC3. Update Shipping Orders
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 | |||
|
|
Elaboration mode. Accepted values: sync, async |
Optional. default: sync |
|
|
Document ID |
Required |
|
|
Document number |
Required |
|
|
Deposit ID (rif. API Dep1) |
Required |
|
|
Department ID (rif. API Depart1) |
Optional |
|
|
Date of document |
Required (format: YYYY-MM-DD) |
|
|
Type of document |
Set with 'OC' |
|
|
Document reason |
Optional |
|
|
Type of transport |
Optional - Accepted values: recipient, sender, carrier |
|
|
Port of goods |
Optional |
|
|
Notes to the document |
optional |
|
|
Number of packages in the document |
Optional |
|
|
Number of MBE service |
Optional
|
|
|
extra services |
Optional
|
|
|
MBE Tracking number |
optional |
Recipient fields | |||
|
|
Recipient ID (rif API D1) |
If valued, it retrieves the recipient's address data through their ID |
|
|
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 |
|
|
First name - surname |
Optional |
|
|
Vat number |
Optional |
|
|
Tax code |
optional |
|
|
Recipient address |
Required if not valued recipient ID field |
|
|
Recipient's province abbreviation |
Optional |
|
|
Recipient's City |
Required if not valued recipient ID field |
|
|
Recipient's CAP |
Required if not valued recipient ID field |
|
|
Recipient's country |
Required if not valued recipient ID field (ISO-2 format) |
|
|
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) | |||
|
|
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 |
|
|
destination address |
Required |
|
|
Sigla provincia destinazione |
Opzionale |
|
|
city of destination |
Required |
|
|
Post code |
Required |
|
|
Nation of destination |
Required (ISO-2 format) |
|
|
Name of destination |
optional |
|
|
phone number of destination |
optional |
|
|
email of destination |
optional |
|
|
Delivery Annotations |
optional |
Field of Order Contract (Optional) | |||
|
Number |
Contract ID |
Optional |
|
String |
Contract code |
Optional |
Products Fields (Array JSON) | |||
|
String |
Primary code of article |
Required |
|
Float |
Quantity of article |
Required (decimal separator '.') |
|
String |
Lot of article |
Required if lot article |
|
Date |
Expired date |
Required if lot/exipred article (format: YYYY-MM-DD) |
|
Date |
Delivery date of product |
Optional (format: YYYY-MM-DD) |
|
|
Article Annotations |
optional |
|
|
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 |
---|---|---|
|
|
Exit code |
|
|
Result information |
|
|
Set of items found |
|
|
Array of IDs Document created |
|
|
number of errors |
|
|
Errors messagges |
Response parameter for elab_mode async
Field | Type | Description |
---|---|---|
|
|
Exit code |
|
|
result information |
|
|
Result container |
|
|
ID of elaboration |
DOC4. Get Purchase Orders
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 |
---|---|---|---|
|
|
Number of items for page |
Greater than zero Default: 25 - MAX: 100 |
|
|
Indicates the page number requested by the user. Useful for any paginations |
Maggiore di zero Default: 1 |
|
|
type of document |
obbligatorio - volori ammessi: 'OF' |
|
|
ID of document |
Optional |
|
|
Number fo document |
optional |
|
|
ID of Supplier |
optional |
|
|
Operator Name or Surname |
optional |
|
|
Search by document date. Indicates the start date of the search |
optional - format yyyy-mm-dd |
|
|
Search by document date. Indicates the end date of the search |
optional - format yyyy-mm-dd |
|
|
Search by last update of document. Indicates the start date of the search |
optional - format yyyy-mm-dd |
|
|
Search by document status. |
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 |
---|---|---|
|
|
Exit code |
|
|
Result information |
|
|
Total item foud |
|
|
Page number |
|
|
tot record for page |
|
|
Set of items found |
DOC5. Create Purchase Orders
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 | |||
|
|
Elaboration mode. Accepted values: sync, async |
Optional. default: sync |
|
|
Document number |
Required |
|
|
Deposit ID (rif. API Dep1) |
Required |
|
|
Department ID (rif. API Depart1) |
Optional |
|
|
Date of document |
Required (format: YYYY-MM-DD) |
|
|
Type of document |
Set with 'OF' |
|
|
Document reason |
Optional |
|
|
Type of transport |
Optional - Accepted values: recipient, sender, carrier |
|
|
Port of goods |
Optional |
|
|
Notes to the document |
optional |
|
|
Number of packages in the document |
Optional |
Supplier fields | |||
|
|
Supplier ID (rif API D1) |
If valued, it retrieves the recipient's address data through their ID |
|
|
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 |
|
|
First name - surname |
Optional |
|
|
Vat number |
Optional |
|
|
Tax code |
optional |
|
|
Recipient address |
Optional |
|
|
Province abbreviation |
Optional |
|
|
City |
Optional |
|
|
Post Code |
Optional |
|
|
Supplier country |
optional |
|
|
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) | |||
|
Number |
Contract ID |
Optional |
|
String |
Contract code |
Optional |
Products Fields (Array JSON) | |||
|
String |
|
Required |
|
Float |
|
Required (decimal separator '.') |
|
String |
|
Required if lot article |
|
String |
|
Required if lot/exipred article |
|
Date |
Delivery date of product |
Optional (format: YYYY-MM-DD) |
|
|
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 |
---|---|---|
|
|
Exit code |
|
|
Result information |
|
|
Set of items found |
|
|
Array of IDs Document created |
|
|
number of errors |
|
|
Errors messagges |
Response parameter for elab_mode async
Field | Type | Description |
---|---|---|
|
|
Exit code |
|
|
result information |
|
|
Result container |
|
|
ID of elaboration |
DOC6. Update Purchase Order
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 | |||
|
|
Elaboration mode. Accepted values: sync, async |
Optional. default: sync |
|
|
Document ID |
Required |
|
|
Document number |
Required |
|
|
Deposit ID (rif. API Dep1) |
Required |
|
|
Department ID (rif. API Depart1) |
Optional |
|
|
Date of document |
Required (format: YYYY-MM-DD) |
|
|
Type of document |
Set with 'OF' |
|
|
Document reason |
Optional |
|
|
Type of transport |
Optional - Accepted values: recipient, sender, carrier |
|
|
Port of goods |
Optional |
|
|
Notes to the document |
optional |
|
|
Number of packages in the document |
Optional |
Supplier fields | |||
|
|
Supplier ID (rif API D1) |
If valued, it retrieves the recipient's address data through their ID |
|
|
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 |
|
|
First name - surname |
Optional |
|
|
Vat number |
Optional |
|
|
Tax code |
optional |
|
|
Recipient address |
Optional |
|
|
Province abbreviation |
Optional |
|
|
City |
Optional |
|
|
Post Code |
Optional |
|
|
Supplier country |
optional |
|
|
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) | |||
|
Number |
Contract ID |
Optional |
|
String |
Contract code |
Optional |
Products Fields (Array JSON) | |||
|
String |
|
Required |
|
Float |
|
Required (decimal separator '.') |
|
String |
|
Required if lot article |
|
String |
|
Required if lot/exipred article |
|
Date |
Delivery date of product |
Optional (format: YYYY-MM-DD) |
|
|
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 |
---|---|---|
|
|
Exit code |
|
|
Result information |
|
|
Set of items found |
|
|
Array of IDs Document created |
|
|
number of errors |
|
|
Errors messagges |
Response parameter for elab_mode async
Field | Type | Description |
---|---|---|
|
|
Exit code |
|
|
result information |
|
|
Result container |
|
|
ID of elaboration |
DOC7. Delete Order
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 |
---|---|---|---|
|
|
Document ID |
Required |
|
|
Type of document |
Required |
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 |
---|---|---|
|
|
Exit code |
|
|
Result information |
|
|
Not Set |
Deposit
This section lists all available methods for managing the Warehouse/Goods Destination resource.
Dep1. Get Deposit
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 |
---|---|---|---|
|
|
Max numbers of item for page |
Greater than zero Default: 25 |
|
|
Page number requested by the user, Useful for paginations |
Greater than zero Default: 1 |
|
|
Deposit ID |
Optional |
|
|
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 |
---|---|---|
|
|
Exit code |
|
|
Result information |
|
|
total number of record found |
|
|
page number |
|
|
Total item for page |
|
|
Result container |
Department
This section lists all available methods for managing the Departments .
Depart1. Get Department
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 |
---|---|---|---|
|
|
Max numbers of item for page |
Greater than zero Default: 25 |
|
|
Page number requested by the user, Useful for paginations |
Greater than zero Default: 1 |
|
|
Department ID |
Optional |
|
|
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 |
---|---|---|
|
|
Exit code |
|
|
Result information |
|
|
total number of record found |
|
|
page number |
|
|
Total item for page |
|
|
Result container |
Elaboration
This section lists all the methods available for managing asynchronous processing.
Elab1. Get Elaboration
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 |
---|---|---|---|
|
|
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 |
---|---|---|
|
|
Exit code |
|
|
Result informations |
|
|
Elaboration |
|
|
Elaboration ID |
|
|
Elaboration status:
|
|
|
Start timestamp |
|
|
End timestamp (NULL if state = 0) |
|
|
Request parameters |
|
|
Response parameters |
Serial
This section lists all the methods available for managing asynchronous processing.
Ser1. Get 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 |
---|---|---|---|
|
|
Max numbers of item for page |
Greater than zero Default: 25 |
|
|
Page number requested by the user, Useful for paginations |
Greater than zero Default: 1 |
|
|
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 |
---|---|---|
|
|
Exit code |
|
|
Result informations |
|
|
Elaboration |
|
|
Serial Lab ID |
|
|
Article Lab ID |
|
|
Serial code |
|
|
location Code |