Package information¶
POST /v1/package_info
Returns the number, size and type of boxes needed to ship a set of items.
Request¶
Send username, password and secretkey along with a data object. See Making requests.
{
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"secretkey": "YOUR_SECRET_KEY",
"data": {
"order_info": [
{
"width": "16",
"height": "24",
"finishing": "Stretched",
"qty": "2"
},
{
"width": "10",
"height": "10",
"finishing": "Rolled",
"qty": "1"
}
]
}
}
curl -X POST https://gatewaybeta.marcofinearts.com/v1/package_info \
-H "Content-Type: application/json" \
-d '{
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"secretkey": "YOUR_SECRET_KEY",
"data": {
"order_info": [
{
"width": "16",
"height": "24",
"finishing": "Stretched",
"qty": "2"
},
{
"width": "10",
"height": "10",
"finishing": "Rolled",
"qty": "1"
}
]
}
}'
data fields¶
| Field | Required | Validation | Notes |
|---|---|---|---|
order_info |
Yes | Array | One object per item. |
order_info[].width |
Yes | Numeric | |
order_info[].height |
Yes | Numeric | |
order_info[].finishing |
No | For rolled prints, pass Rolled. |
|
order_info[].qty |
Yes | Numeric | Quantity. |
Response¶
{
"res": "success",
"package": {
"package_type": "YOUR_PACKAGING",
"box_info": [
{
"width": 27,
"height": 22,
"length": 4
},
{
"width": 10,
"height": 12,
"length": 4
}
]
}
}
{
"res": "error",
"code": "000",
"message": "Error message."
}
Error codes¶
| Code | Error | Description |
|---|---|---|
1101 |
Authentication failed | Your account is invalid or does not have API access. Check username, password and secretkey. |
1102 |
Missing field | One or more required fields are missing. |
1104 |
Invalid data type | One or more fields must be numeric. |
1113 |
Invalid data | Unexpected error. Try again. |
1123 |
Invalid data | One or more items have invalid values. |