Developer Documentation. API integration

Using our API, you can use the EasyPackMaker engine to integrate in your web application. The API uses HTTP as the main protocol, which means it is suitable for development in any programming language that can work with HTTP libraries (cURL and others).

The API supports POST requests that use JSON arguments. The API always returns a response in JSON format.

To get access you need:

  • Register or log in to our site, if necessary.
  • In your Personal Account, read and accept the End User License Agreement.
  • Send us an API activation request via the feedback form. Describe how you will use our interface.
  • After reviewing your request, the account will switch to API mode*.
  • You will receive a service access code ("API Password" in Personal Account) and implement interaction.

* After switching, using the account in normal mode is not possible.

Request creation

Description

The method creates a request to the API and, if successful, returns the calculated packaging model.

Method POST
URL https://easypackmaker.com/generator/api
Response format JSON
Request
Parameters Description Type Required
UserName The Username registered as an API user. string(255) Yes
Token See Request Signature. string Yes
OrderId Order ID in the customer system. string(20) Yes
ModelName The name of the model. All available names are presented in the table. string(20) Yes
ModelParams An array of data on the main parameters of the model. All sizes, material thickness and units. See Structure of the ModelParams Object. object Yes
ModelOptions Array of data of additional model parameters. Glue areas, information about knives, shape of elements, etc. See Structure of the ModelOptions Object. object Yes

Request examples:

{
   "UserName":"User",
   "Token":"4a4d74a9793001864428800ad2a42c7b7735d3851d0f59db914173d00ce38240",
   "OrderId":"1001",
   "ModelName":"A10_10_03_03",
   "ModelParams":
   {
      "L":"100",
      "W":"50",
      "D":"150",
      "Th":"0.5",
      "Units":"mm"
   },
   "ModelOptions":
   {
      "DimensionType":"Crease",
      "KnifeInfo":true,
      "GlueZone":false
   }
}
{
   "UserName":"User",
   "Token":"f6a0df7d78ed42002b7a3f3db5dd6bff38567e62213dac404e787fb7f153bd48",
   "OrderId":"1002",
   "ModelName":"fefco_0200",
   "ModelParams":
   {
      "L":"250",
      "W":"200",
      "D":"150",
      "Th":"4",
      "Units":"mm"
   },
   "ModelOptions":
   {
      "FluteDir":"Vertical",
      "DimensionType":"In",
      "GlueZone":false,
      "KnifeInfo":true
   }
}
Response
Parameters Description Type Required
Status Model calculation status. Possible values: "Success", "Failed". string(20) Yes
ErrorCode Error code. If no error has occurred, the value "0" is returned. number(2) Yes
Details Error description string No
Model The calculated model. The data is encoded in MIME base64 format. To obtain a model in PDF format, use the MIME base64 decoding function. string No

Examples of response:

{
   "Status":"Success",
   "ErrorCode":0,
   "Model":"JVBERi0xLjMKMyAwIG9iago8PC9UeXBlIC9QYWdlCi9QYXJlbnQgMSAwIFIKL01lZGlhQm94IFswIDAgOTAwLjcwODcgNzIyLjgzNDZdCi9SZXNvdXJjZXMgMiAwIFIKL0NvbnRlbnRzIDQgMCBSPj4KZW5kb2JqCjQgMCBvYmoKPDwvRmlsdGVyIC9GbGF0ZURlY29kZSAvTGVuZ3RoIDQ0MD4+CnN0cmVhbQp4nI1Uy07DMBC85yv2CAcWr9\/ukQoOHJCq5AeqUiRQA4KCQHw9bpv6ETstuTSa7szOvsLgviFk\/oHv5nrecpi3sAegnT80ghuUjDQoI5GRMtBDwEhatGQdbKBtpHZIQrg0MmBZpFEclbMyjQxYFun9UO7HOo6cSZNyAzbmjmqRAp0wzIcN\/rNShpcdtSxwqpQE1agdd3kpA5YVnWjWjb8P82DARr9X4z+4M6iFsQxWfaVZseBjygBxOxjfxGpr2JlxlNw+9iTqVbllR6vc2LkadsZfye3jCiV69UksTiyRMgqlEJQuUcCyJardQ8BGl6ORJGX3ELCpyykvYqLdwfiRGiBDEoVgJh18DTuToeQmA416p5chtVdyYwdq2Bl\/JTdZhkRvsqOTqxAHPL64f8\/ComK78rVExUntbBwQUhYFCe6RqvpNB9d3BMQPH\/HuCW675h18Ug2r7ZB0u3oFH6gUcqP8IJXxsHHQPcJF+\/y73s5AEKGFH+DSH0l\/Cd2LF4JF0GeFPk3rS4r686\/PmbdMIpPdK\/BpBcEShY\/1crv2IuRcKaKmRchFke7tc7mZAddEmcYfHypzOAplbmRzdHJlYW0KZW5kb2JqCjEgMCBvYmoKPDwvVHlwZSAvUGFnZXMKL0tpZHMgWzMgMCBSIF0KL0NvdW50IDEKL01lZGlhQm94IFswIDAgNTk1LjI4MDAgODQxLjg5MDBd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