API Carico merci in libreria
|
|---|
API Carico merci in libreriaQuesta API consente di gestire le DDT e i titoli relativi a spedizioni verso le librerie. Per gestire le API del Carico merci in libreria tramite autenticazione è necessario utilizzare lo scope: outbound_api_scope. OperazioniL'API espone i seguenti metodi:
Ricerca sommario DDTRicerca sommario DDTOttiene il sommario delle DDT.Risponde a richieste GET verso: /outbound/bolSummary Come filtri di ricerca, è possibile passare in query string i seguenti parametri opzionali:
Esempio richiesta:GET https://api.messaggerielibri.it/outbound/bolSummary?&startDate=2018-01-01&endDate=2022-12-28 Authorization: Bearer[TOKEN JWT] Esempio risposta: {
"shipped": 3,
"received": 68,
"closed": 31,
"error": 3,
"lost": 7
}
FeaturesPer utilizzare il metodo API è necessario possedere una o più delle seguenti features:
altrimenti viene restituito 403 (Forbidden) Ricerca DDTRicerca DDTOttiene l’elenco delle DDT.Risponde a richieste GET verso: /outbound/bol Come filtri di ricerca, è possibile passare in query string i seguenti parametri opzionali:
Esempio richiesta:GET https://api.messaggerielibri.it/outbound/bol?pageIndex=1&pageSize=50&endDate=2023-01-03&state=shipped&orderBy=date&orderDirection=asc Authorization: Bearer[TOKEN JWT] Esempio risposta: {
"totalCount": 3,
"totalPages": 1,
"page": {
"index": 1,
"size": 50,
"from": 1,
"to": 3
},
"bols": [
{
"plant": "ME60",
"number": "326467",
"date": "2018-10-26",
"customer": {
"code": "05586700",
"description": "VOLARE SAS DI VOLA MARCO E C."
},
"state": "shipped",
"receiptNotes": "",
"packed": {
"titles": 18,
"packages": 1,
"quantity": 37,
"listPrice": 528.10000,
"netPrice": 300.89000
},
"packagingAmount": 1.0
},
{
"plant": "ME60",
"number": "327905",
"date": "2018-10-29",
"customer": {
"code": "05586700",
"description": "VOLARE SAS DI VOLA MARCO E C."
},
"state": "shipped",
"receiptNotes": "",
"packed": {
"titles": 1,
"packages": 2,
"quantity": 35,
"listPrice": 455.00000,
"netPrice": 245.70000
},
"packagingAmount": 2.0
},
{
"plant": "ME60",
"number": "220343",
"date": "2022-08-08",
"customer": {
"code": "00021500",
"description": "HOEPLI SPA"
},
"state": "shipped",
"courier": {
"code": "00010566"
},
"packed": {
"titles": 1,
"packages": 18,
"quantity": 1,
"listPrice": 50.00000,
"netPrice": 27.50000
},
"packagingAmount": 18.0
}
]
}
FeaturesPer utilizzare il metodo API è necessario possedere una o più delle seguenti features:
altrimenti viene restituito 403 (Forbidden) Recupero DDT in formato PDFRecupero DDT in formato PDFRestituisce un documento di transito in formato PDF.Risponde a richieste GET verso: /outbound/plant/{plant}/bol/{year}/{billOfLading}/pdf Per identificare la DDT da recuperare sono utilizzati i seguenti parametri:
Esempio richiesta :GET https://api.messagerielibri.it/outbound/plant/ME60/bol/2018/259183/pdf Authorization: Bearer [TOKEN JWT]
FeaturesPer utilizzare il metodo API è necessario possedere una o più delle seguenti features:
altrimenti viene restituito 403 (Forbidden) Elenco colli DDTElenco colli DDTRestituisce l'elenco dei colli associati ad una singola DDT o a DDT multiple.Risponde a richieste GET verso:
Esempio richiesta DDT singola:GET https://api.messaggerielibri.it/outbound/plant/ME60/bol/2018/259183 Authorization: Bearer [TOKEN JWT] Esempio risposta DDT singola:{
"plant":"ME60",
"number":"259183",
"date":"2018-09-05",
"customerCode":"00021500",
"state":"received",
"receiveDate":"2018-09-07T10:24:57Z",
"receiptNotes":"Note di ricezione ...",
"packages":[
{
"id":"MEL004952916",
"state":"received",
"packed":{
"quantity":20,
"listPrice":380.00000,
"netPrice":194.60000
},
"confirmed":{
"quantity":1,
"listPrice":0.0000,
"netPrice":0.0000
}
},
{
"id":"MEL004953156",
"state":"received",
"packed":{
"quantity":15,
"listPrice":223.50000,
"netPrice":132.00000
},
"confirmed":{
"quantity":15,
"listPrice":223.5000,
"netPrice":132.0000
}
},
{
"id":"MEL004953157",
"state":"shipped",
"packed":{
"quantity":31,
"listPrice":558.00000,
"netPrice":285.82000
}
}
]
}
Esempio richiesta DDT multiple:GET https://api.messaggerielibri.it/outbound/bol?orderDirection=desc&orderBy=packagesCount Authorization: Bearer [TOKEN JWT] Esempio risposta DDT multiple:[
{
"plant":"ME60",
"number":"259183",
"date":"2018-09-05",
"customerCode":"00021500",
"state":"received",
"receiveDate":"2018-09-07T10:24:57Z",
"receiptNotes":"Note di ricezione ...",
"packages":[
{
"id":"MEL004952916",
"state":"received",
"packed":{
"quantity":20,
"listPrice":380.00000,
"netPrice":194.60000
},
"confirmed":{
"quantity":1,
"listPrice":0.0000,
"netPrice":0.0000
}
},
{
"id":"MEL004953156",
"state":"shipped",
"packed":{
"quantity":15,
"listPrice":223.50000,
"netPrice":132.00000
}
}
]
},
{
"plant":"ME60",
"number":"261529",
"date":"2018-09-07",
"customerCode":"02501701",
"state":"shipped",
"packages":[
{
"id":"MEL013548874",
"state":"shipped",
"packed":{
"quantity":1,
"listPrice":0.00000,
"netPrice":0.00000
}
}
]
}
]
FeaturesPer utilizzare il metodo API è necessario possedere una o più delle seguenti features:
altrimenti viene restituito 403 (Forbidden) Elenco posizioni DDTElenco posizioni DDTOttiene l'elenco delle posizioni contenute in una singola DDT.Risponde a richieste GET verso:
L’operazione restituisce uno o più oggetti JSON contenente i seguenti campi:
Esempio richiesta DDT singola:GET https://api.messaggerielibri.it/outbound/plant/ME60/bol/2021/005661/position Authorization: Bearer [TOKEN JWT] Esempio risposta DDT singola:[
{
"ean": "9788862508087",
"quantity": 2,
"price": 18.00,
"totalPrice": 36.00,
"deliveryRef": {
"number": "0806432707",
"position": "000001"
},
"discount": {
"percentage": 35.00,
"amount": 12.12,
"rebatePercentage": 100.00,
"rebateAmount": 0.48
},
"taxes": {
"taxableAmount": 11.70,
"taxableTotalAmount": 23.40,
"amount": 0.00,
"totalAmount": 0.00
},
"termsOfPayment": {
"code": "15",
"description": "150 GG. FINE MESE"
},
"paymentMethod": {
"code": "8",
"description": "Ricevuta bancaria"
},
"typeOfSupply": {
"code": "BA",
"description": "Vendita"
},
"relevantForBilling": true
}
]
Esempio richiesta DDT multiple:GET https://api.messaggerielibri.it/outbound/plant/ME60/bol/2022/position?number=286532&number=286534 Authorization: Bearer [TOKEN JWT] Esempio risposta DDT multiple:[
{
"plant": "ME60",
"number": "286532",
"date": "2022-10-18",
"customer": {
"code": "00021500",
"description": "HOEPLI SPA"
},
"positions": [
{
"ean": "9788832820089",
"title": "CRITICA DEL PENSIERO UNICO",
"vendor": {
"code": "339",
"description": "ALBERTO CASTELVECCHI - LIT ED."
},
"quantity": 35,
"price": 5.00,
"totalPrice": 4.81,
"deliveryRef": {
"number": "286530",
"position": "000001"
},
"customerRef": {
"number": "FAX_20210902132703",
"date": "2021-09-02",
"position": "000001"
},
"discount": {
"percentage": 37.00,
"amount": -370.00,
"additionalPercentage": 0.00,
"rebatePercentage": -3.00
},
"netAmount": 3.22,
"termsOfPayment": {
"code": "15",
"description": "150 GG. FINE MESE"
},
"paymentMethod": {
"code": "8",
"description": "Ricevuta bancaria"
},
"typeOfSupply": {
"code": "BA",
"description": "Vendita"
},
"relevantForBilling": true
},
{
"ean": "9788832820090",
"quantity": 35,
"price": 5.00,
"totalPrice": 4.81,
"deliveryRef": {
"number": "286530",
"position": "000002"
},
"customerRef": {
"number": "FAX_20210902132703",
"date": "2021-09-02",
"position": "000001"
},
"discount": {
"percentage": 37.00,
"amount": -250.00,
"additionalPercentage": 0.00,
"rebatePercentage": -3.00
},
"netAmount": 3.22,
"termsOfPayment": {
"code": "15",
"description": "150 GG. FINE MESE"
},
"paymentMethod": {
"code": "8",
"description": "Ricevuta bancaria"
},
"typeOfSupply": {
"code": "BA",
"description": "Vendita"
},
"relevantForBilling": true
}
}
]
[
{
"plant": "ME60",
"number": "286532",
"date": "2022-10-18",
"customer": {
"code": "00021500",
"description": "HOEPLI SPA"
},
"positions": [
{
"ean": "9788832820089",
"title": "CRITICA DEL PENSIERO UNICO",
"vendor": {
"code": "339",
"description": "ALBERTO CASTELVECCHI - LIT ED."
},
"quantity": 35,
"price": 5.00,
"totalPrice": 4.81,
"deliveryRef": {
"number": "286530",
"position": "000001"
},
"customerRef": {
"number": "FAX_20210902132703",
"date": "2021-09-02",
"position": "000001"
},
"discount": {
"percentage": 37.00,
"amount": -370.00,
"additionalPercentage": 0.00,
"rebatePercentage": -3.00
},
"netAmount": 3.22,
"termsOfPayment": {
"code": "15",
"description": "150 GG. FINE MESE"
},
"paymentMethod": {
"code": "8",
"description": "Ricevuta bancaria"
},
"typeOfSupply": {
"code": "BA",
"description": "Vendita"
},
"relevantForBilling": true
},
{
"ean": "9788832820090",
"quantity": 35,
"price": 5.00,
"totalPrice": 4.81,
"deliveryRef": {
"number": "286530",
"position": "000002"
},
"customerRef": {
"number": "FAX_20210902132703",
"date": "2021-09-02",
"position": "000001"
},
"discount": {
"percentage": 37.00,
"amount": -250.00,
"additionalPercentage": 0.00,
"rebatePercentage": -3.00
},
"netAmount": 3.22,
"termsOfPayment": {
"code": "15",
"description": "150 GG. FINE MESE"
},
"paymentMethod": {
"code": "8",
"description": "Ricevuta bancaria"
},
"typeOfSupply": {
"code": "BA",
"description": "Vendita"
},
"relevantForBilling": true
}
}
]
FeaturesPer utilizzare il metodo API è necessario possedere una o più delle seguenti features:
altrimenti viene restituito 403 (Forbidden) Elenco titoli che appartengono a uno o più colliElenco titoli che appartengono a uno o più colliRestituisce l’elenco dei titoli presenti in uno o più colli di una DDT.Risponde a richieste GET verso:
L’operazione restituisce uno o più oggetti JSON contenente i seguenti campi:
Esempio richiesta collo singolo:GET https://api.messaggerielibri.it/outbound/plant/ME60/bol/2018/340901/package/MEL0211930 Authorization: Bearer[TOKEN JWT] Esempio risposta collo singolo: {
"id":"MEL002211930",
"state":"received",
"titles":[
{
"ean":"9780714846620",
"title":"STEPHEN SHORE",
"vendor":{
"code":"371",
"description":"PHAIDON PRESS LIMITED"
},
"price":39.95,
"customerRef":{
"number":"29669-18",
"date":"2018-10-31"
},
"packedQuantity":1
}
]
}
Esempio richiesta colli multipli:GET https://ml-api-dev-mgmt.azure-api.net/outbound/package?id=MEL002211930&id=MEL002212855 Authorization: Bearer [TOKEN JWT] Esempio risposta colli multipli:[
{
"id": "MEL002211930",
"state": "received",
"billofLading": {
"plant": "ME60",
"number": "340901",
"date": "2018-11-06",
"customerCode": "00021500",
"state": "received"
},
"titles": [
{
"ean": "9780714846620",
"title": "STEPHEN SHORE",
"vendor": {
"code": "371",
"description": "PHAIDON PRESS LIMITED"
},
"price": 39.95,
"customerRef": {
"number": "29669-18",
"date": "2018-10-31"
},
"packedQuantity": 1
}
]
},
{
"id": "MEL002212855",
"state": "shipped",
"billofLading": {
"plant": "ME60",
"number": "340901",
"date": "2018-11-06",
"customerCode": "00021500",
"state": "received"
},
"titles": [
{
"ean": "9782067211872",
"title": "CARTA 11750 ISLANDA",
"vendor": {
"code": "560",
"description": "MICHELIN CARTOGRAFIA"
},
"price": 8.50,
"customerRef": {
"number": "29832-18",
"date": "2018-11-02"
},
"packedQuantity": 2
},
{
"ean": "9780714873459",
"title": "YAYOI KUSAMA",
"vendor": {
"code": "371",
"description": "PHAIDON PRESS LIMITED"
},
"price": 59.95,
"customerRef": {
"number": "29787-18",
"date": "2018-10-31"
},
"packedQuantity": 1
}
]
}
]
Esempio richiesta colli multipli con parametri:GET https://api.messaggerielibri.it/outbound/plant/ME60/bol/2022/220343/package Authorization: Bearer [TOKEN JWT] Esempio risposta colli multipli con parametri:[
{
"id": "MEL053609668",
"state": "shipped",
"titles": [
{
"price": 50.00,
"customerRef": {
"number": "740753760",
"date": "2022-06-08"
},
"packedQuantity": 1
}
]
}
]
FeaturesPer utilizzare il metodo API è necessario possedere una o più delle seguenti features:
altrimenti viene restituito 403 (Forbidden) Conferma consegnaConferma consegnaConferma la ricezione di una consegna presso la libreria.Risponde a richieste POST verso: /outbound/plant/{plant}/bol/{year}/{billOfLading}/checkin Per identificare la DDT da confermare sono utilizzati i seguenti parametri:
Esempio richiestaGET
https://api.messagerielibri.it/outbound/plant/ME60/bol/2018/259183/checkin
Authorization: Bearer [TOKEN JWT]
body:
{
"packageCount": 3,
"packages": [ "MEL004952916", "MEL004953156", "MEL004953157" ],
"date": "2021-06-17",
"notes": "...note di consegna"
}
FeaturesPer utilizzare il metodo API è necessario possedere una o più delle seguenti features:
altrimenti viene restituito 403 (Forbidden) Ricerca titoli in consegnaRicerca titoli in consegnaOttiene l'elenco dei titoli in consegna.Risponde a richieste GET verso: /outbound/title Come filtri di ricerca, è possibile passare in query string i seguenti parametri opzionali:
Esempio richiestaGET https://api.messagerielibri.it/outbound/title Authorization: Bearer [TOKEN JWT] Esempio risposta{
"totalCount": 9226,
"totalPages": 185,
"page": {
"index": 1,
"size": 50,
"from": 1,
"to": 50
},
"titles": [
{
"ean": "9788854188501",
"title": "I DOLCI NAPOLETANI IN 300 RICETTE",
"vendor": {
"code": "541",
"description": "NEWTON COMPTON EDITORI"
},
"price": 4.90,
"customerRef": {
"date": "2015-12-29"
},
"billofLading": {
"plant": "ME60",
"number": "339919",
"date": "2016-12-12",
"customerCode": "06000559",
"state": "received"
},
"package": {
"id": "MEL002953075",
"state": "shipped"
},
"packedQuantity": 1,
"confirmedQuantity": 1
},
{
"ean": "9788811684220",
"title": "V.E. IL PROFUMO DELLE FOGLIE DI LIMONE",
"vendor": {
"code": "101",
"description": "GARZANTI LIBRI S.P.A."
},
"price": 9.90,
"customerRef": {
"date": "2015-12-29"
},
"billofLading": {
"plant": "ME60",
"number": "339919",
"date": "2016-12-12",
"customerCode": "06000559",
"state": "received"
},
"package": {
"id": "MEL002953498",
"state": "shipped"
},
"packedQuantity": 3,
"confirmedQuantity": 3
},
{
"ean": "9788838927072",
"title": "GLI SCHELETRI NELL'ARMADIO",
"vendor": {
"code": "017",
"description": "SELLERIO EDITORE SRL"
},
"price": 13.00,
"customerRef": {
"date": "2015-12-29"
},
"billofLading": {
"plant": "ME60",
"number": "339919",
"date": "2016-12-12",
"customerCode": "06000559",
"state": "received"
},
"package": {
"id": "MEL002953498",
"state": "shipped"
},
"packedQuantity": 1,
"confirmedQuantity": 1
},
{
"ean": "9788838930652",
"title": "IL SEGRETO DI ANGELA",
"vendor": {
"code": "017",
"description": "SELLERIO EDITORE SRL"
},
"price": 14.00,
"customerRef": {
"date": "2015-12-29"
},
"billofLading": {
"plant": "ME60",
"number": "339919",
"date": "2016-12-12",
"customerCode": "06000559",
"state": "received"
},
"package": {
"id": "MEL002953498",
"state": "shipped"
},
"packedQuantity": 1,
"confirmedQuantity": 1
},
{
"ean": "9788838931987",
"title": "IL CASO KAKOIANNIS SFORZA",
"vendor": {
"code": "017",
"description": "SELLERIO EDITORE SRL"
},
"price": 14.00,
"customerRef": {
"date": "2015-12-29"
},
"billofLading": {
"plant": "ME60",
"number": "339919",
"date": "2016-12-12",
"customerCode": "06000559",
"state": "received"
},
"package": {
"id": "MEL002953498",
"state": "shipped"
},
"packedQuantity": 1,
"confirmedQuantity": 1
},
{
"ean": "9788838932854",
"title": "PICCOLA ENCICLOPEDIA DELLE OSSESSIONI",
"vendor": {
"code": "017",
"description": "SELLERIO EDITORE SRL"
},
"price": 16.00,
"customerRef": {
"date": "2015-12-29"
},
"billofLading": {
"plant": "ME60",
"number": "339919",
"date": "2016-12-12",
"customerCode": "06000559",
"state": "received"
},
"package": {
"id": "MEL002953498",
"state": "shipped"
},
"packedQuantity": 1,
"confirmedQuantity": 1
},
{
"ean": "9788838933714",
"title": "L'UOMO CON LA VALIGIA",
"vendor": {
"code": "017",
"description": "SELLERIO EDITORE SRL"
},
"price": 14.00,
"customerRef": {
"date": "2015-12-29"
},
"billofLading": {
"plant": "ME60",
"number": "339919",
"date": "2016-12-12",
"customerCode": "06000559",
"state": "received"
},
"package": {
"id": "MEL002953498",
"state": "shipped"
},
"packedQuantity": 1,
"confirmedQuantity": 4
}
]
}
FeaturesPer utilizzare il metodo API è necessario possedere una o più delle seguenti features:
altrimenti viene restituito 403 (Forbidden) Riscontro titoliRiscontro titoliConferma la ricezione di un titolo presso la libreria.Risponde a richieste POST verso:
La conferma per EAN multipli richiede una lista di oggetti JSON contenenti i seguenti campi:
Esempio richiesta singolo EAN senza indicazione del collo:POST https://api.messaggerielibri.it/outbound/plant/ME60/bol/2018/256405/title/9788807173516/checkin Authorization: Bearer [TOKEN JWT] body: 120
Esempio richiesta singolo EAN con indicazione del collo:POST https://api.messaggerielibri.it/outbound/plant/ME60/bol/2018/256405/package/MEL013537138/title/9788807173516/checkin Authorization: Bearer [TOKEN JWT] body: 120
Esempio richiesta EAN multipli senza indicazione del collo:POST
https://api.messaggerielibri.it/outbound/plant/ME60/bol/2018/256405/titleCheckin
Authorization: Bearer [TOKEN JWT]
body:
[
{
"ean": "9788893445870" ,
"quantity": 20
},
{
"ean": "9788893674577" ,
"quantity": 8
},
{
"ean": "9788899240370" ,
"quantity": 4
}
]
Esempio richiesta EAN multipli con indicazione del collo:POST
https://api.messaggerielibri.it/outbound/plant/ME60/bol/2018/256405/package/MEL013537138/titleCheckin
Authorization: Bearer [TOKEN JWT]
body:
[
{
"ean": "9788893445870" ,
"quantity": 20
},
{
"ean": "9788893674577" ,
"quantity": 8
},
{
"ean": "9788899240370" ,
"quantity": 4
}
]
FeaturesPer utilizzare il metodo API è necessario possedere una o più delle seguenti features:
altrimenti viene restituito 403 (Forbidden) Chiusura DDTChiusura DDTPermette alla libreria di chiudere la DDT, dopo il riscontro dei titoli ricevuti.Risponde a richieste POST verso: plant/{plant}/bol/{year}/{billOfLading}/close
Esempio richiestaPOST https://api.messagerielibri.it/outbound/plant/ME60/bol/2018/0000346535/close Authorization: Bearer [TOKEN JWT] FeaturesPer utilizzare il metodo API è necessario possedere una o più delle seguenti features:
altrimenti viene restituito 403 (Forbidden) |