我正在尝试集成shipengine API以通过发货的发货方式下订单 我的发货要求正在他们的服务器上,并对该请求做出了相应的响应,如下所示:
{
"rate_response": {
"rates": [
{
"rate_id": "se-20653763",
"rate_type": "shipment",
"carrier_id": "se-341525",
"shipping_amount": {
"currency": "usd",
"amount": 0.47
},
"insurance_amount": {
"currency": "usd",
"amount": 0.00
},
"confirmation_amount": {
"currency": "usd",
"amount": 0.00
},
"other_amount": {
"currency": "usd",
"amount": 0.00
},
"zone": 3,
"package_type": "letter",
"delivery_days": 5,
"guaranteed_service": false,
"estimated_delivery_date": "2018-09-04T00:00:00Z",
"carrier_delivery_days": "3",
"ship_date": "2018-08-30T00:00:00Z",
"negotiated_rate": false,
"service_type": "USPS First Class Mail",
"service_code": "usps_first_class_mail",
"trackable": true,
"carrier_code": "stamps_com",
"carrier_nickname": "Free",
"carrier_friendly_name": "Stamps.com",
"validation_status": "valid",
"warning_messages": [],
"error_messages": []
},
{
"rate_id": "se-20653764",
"rate_type": "shipment",
"carrier_id": "se-341525",
"shipping_amount": {
"currency": "usd",
"amount": 1.00
},
"insurance_amount": {
"currency": "usd",
"amount": 0.00
},
"confirmation_amount": {
"currency": "usd",
"amount": 0.00
},
"other_amount": {
"currency": "usd",
"amount": 0.00
},
"zone": 3,
"package_type": "large_envelope_or_flat",
"delivery_days": 5,
"guaranteed_service": false,
"estimated_delivery_date": "2018-09-04T00:00:00Z",
"carrier_delivery_days": "3",
"ship_date": "2018-08-30T00:00:00Z",
"negotiated_rate": false,
"service_type": "USPS First Class Mail",
"service_code": "usps_first_class_mail",
"trackable": true,
"carrier_code": "stamps_com",
"carrier_nickname": "Free",
"carrier_friendly_name": "Stamps.com",
"validation_status": "valid",
"warning_messages": [],
"error_messages": []
},
{
"rate_id": "se-20653765",
"rate_type": "shipment",
"carrier_id": "se-341525",
"shipping_amount": {
"currency": "usd",
"amount": 2.66
},
"insurance_amount": {
"currency": "usd",
"amount": 0.00
},
"confirmation_amount": {
"currency": "usd",
"amount": 0.00
},
"other_amount": {
"currency": "usd",
"amount": 0.00
},
"zone": 3,
"package_type": "package",
"delivery_days": 5,
"guaranteed_service": false,
"estimated_delivery_date": "2018-09-04T00:00:00Z",
"carrier_delivery_days": "3",
"ship_date": "2018-08-30T00:00:00Z",
"negotiated_rate": false,
"service_type": "USPS First Class Mail",
"service_code": "usps_first_class_mail",
"trackable": true,
"carrier_code": "stamps_com",
"carrier_nickname": "Free",
"carrier_friendly_name": "Stamps.com",
"validation_status": "valid",
"warning_messages": [],
"error_messages": []
},
{
"rate_id": "se-20653766",
"rate_type": "shipment",
"carrier_id": "se-341525",
"shipping_amount": {
"currency": "usd",
"amount": 6.79
},
"insurance_amount": {
"currency": "usd",
"amount": 0.00
},
"confirmation_amount": {
"currency": "usd",
"amount": 0.00
},
"other_amount": {
"currency": "usd",
"amount": 0.00
},
"zone": 3,
"package_type": "package",
"delivery_days": 2,
"guaranteed_service": false,
"estimated_delivery_date": "2018-09-01T00:00:00Z",
"carrier_delivery_days": "2",
"ship_date": "2018-08-30T00:00:00Z",
"negotiated_rate": false,
"service_type": "USPS Priority Mail",
"service_code": "usps_priority_mail",
"trackable": true,
"carrier_code": "stamps_com",
"carrier_nickname": "Free",
"carrier_friendly_name": "Stamps.com",
"validation_status": "valid",
"warning_messages": [],
"error_messages": []
},
{
"rate_id": "se-20653767",
"rate_type": "shipment",
"carrier_id": "se-341525",
"shipping_amount": {
"currency": "usd",
"amount": 12.45
},
"insurance_amount": {
firebase控制台中仅显示一半的JSON响应。
我知道,shipengine将提供(23kb)的响应文件,但firebase限制为4kb。因此,我无法在控制台中看到完整的响应。还有其他方法吗?我想从响应中提取速率。
谢谢。