Check APIs
This API allows you to make an HTTP request to verify that the provided parameters can be used to create a proper box.
Check the feasibility of a box
- URL:
/v1/reseller/check
- Method:
GET
- Header:
Authorization
. To make a valid request you need to be authenticated using access token. For more info see authentication - URL params:
- article: the box type you want to generate, e.g. s020_v1. For more info see articles
- material: the type of material used to print the box, e.g. SBS300. For more info see materials
- width: the width of the box, e.g. 65, in millimeters. The width must be a numeric value with max precision set to two decimal places
- depth: the depth of the box, e.g. 65, in millimeters. The depth must be a numeric value with max precision set to two decimal places
- height: the height of the box, e.g. 75, in millimeters. The height must be a numeric value with max precision set to two decimal places
- Data params: none
- Response: the response will be provided with content type application/json and will contain the following fields:
- request: an object that contains all data you used on your HTTP request and it will contain the following fields:
- uri: the URI you used to make the HTTP request
- method: the HTTP method, e.g. GET
- query: an object containing all the parameters and the related values you used to make the HTTP request
- response: an array containing all the issues, if any, that prevents to create a proper box. Each one of these issues will become an error for the endpoints that require a proper box to work. Every issue is an object with the following fields:
- code: the code of the error that will be raised by the endpoints that require a proper box to work (refer to the errors of type BOX_ERROR in the errors page)
- path: if present, the path of the field involved
- message: a message that describes the issue
- request: an object that contains all data you used on your HTTP request and it will contain the following fields:
Errors
The errors raised by this endpoint can be of the following types:
- VALIDATION_ERROR
- CHC_1100: article is required and must be a valid article code
- CHC_1101: material is required and must be a valid material code
- CHC_1102: width is required and must be a positive number with no more than two decimal places
- CHC_1103: depth is required and must be a positive number with no more than two decimal places
- CHC_1104: height is required and must be a positive number with no more than two decimal places
- INTERNAL_SERVER_ERROR
- for this type of errors, please refer to the errors page
- NOT_FOUND
- for this type of errors, please refer to the errors page
Examples
Request
GET /v1/reseller/check HTTP/1.1
Authorization: Bearer eHZ6MWV2R ... o4OERSZHlPZw==
Content-Type: application/x-www-form-urlencoded;charset=UTF-8
article=s001_v0
material=SBS300
width=80
depth=180
height=120
Response
HTTP status code: 200
{
"request": {
"uri": "/v1/reseller/check",
"method": "GET",
"query": {
"article": "s001_v0",
"material": "SBS300",
"width": 80,
"depth": 180,
"height": 120
}
},
"response": [
{
"code": "BOX_3102",
"path": "",
"message": "depth cannot be more than twice width"
}
]
}