Export

List all exports

Get the list of all exports that belong to the current user's group.

API Request

GET https://api.bespokify.com/v2/exports

Request parameters

Parameter Type Required Description
search string no The text used to search for export file types.
orderBy string no The field to order exports by. Possible values: createdAt. Default: createdAt
sort string no The order to sort exports in. Possible values: asc, desc. Default: desc
status string no Used to filter exports by status in generation. Possible values: inProgress, failed, completed
fileType string no Used to filter exports by fileType. Possible values: dxf, pdf, plt
draftId string no The draft ID to filter exports by

Example response

[
  {
    "id": "26c85e0a-4e99-4228-8dce-542f506730e7",
    "draftId": "e02bc2c6-ff09-4f71-9b31-062f5ef7e751",
    "fileType": "dxf",
    "status": "completed",
    "createdAt": "2018-08-24T09:51:18.376Z",
    "createdBy": "lorem"
  }
]

Create export

API Request

POST https://api.bespokify.com/v2/exports

Request parameters

Parameter Type Required Description
draftId string yes The draft ID
callbackUrl string no The URL that our server will send the response data to. See: Callback URL
fileType string yes Possible values: dxf, plt, pdf
config object no There will be advanced options for different filetypes. See: Export config
materials object no The materials used in this export. For material config, see nesting config and scaling config.
nesting object no The nesting config. See: Nesting config
objects array no Objects to be included in the export. Available objects: Get single draft. If the array is empty, all draft objects will be exported.

Example Request

{
  "draftId": "e02bc2c6-ff09-4f71-9b31-062f5ef7e751",
  "callbackUrl": "https://bespokify.com/callbackUrl",
  "fileType": "dxf",
  "config": {
    "format": "aama",
    "driver": "generic",
    "singleInstance": true,
    "materialGroup": false,
    "singleFile": false
  },
  "materials": {
    "primary": {
      "nesting": {
        "preNestRotation": 30,
        "partRotation": "+180"
      },
      "scaling": {
        "easeAdjWarp": 1,
        "easeAdjWeft": 1,
        "shrinkageWarp": 1,
        "shrinkageWeft": 1
      }
    },
    "contrast": {
      "nesting": {
        "preNestRotation": 270,
        "partRotation": "0"
      }
    },
    "interlining": {
      "nesting": {
        "partRotation": null
      }
    }
  },
  "nesting": {
    "sheetWidth": 140,
    "preNestRotation": 45,
    "partRotation": "+90",
    "partMargin": 1,
    "sheetLength": 3000,
    "sheetEdgeMargin": 10
  },
  "objects": ["ShirtFront", "ShirtBack"]
}

Example response

{
  "id": "26c85e0a-4e99-4228-8dce-542f506730e7",
  "jobUrl": "https://api.bespokify.com/v2/jobs/2e2a82d6-f7ee-4cd8-87aa-b56656e820f4"
}

You can monitor the status of this job using the jobUrl.

Get single export

Get an export by its ID.

API Request

GET https://api.bespokify.com/v2/exports/{id}

Request parameters

Parameter Type Required Description
id string yes The ID of the export to retrieve.

Example response

{
  "id": "26c85e0a-4e99-4228-8dce-542f506730e7",
  "draftId": "e02bc2c6-ff09-4f71-9b31-062f5ef7e751",
  "fileType": "dxf",
  "config": {
    "singleInstance": true,
    "materialGroup": false,
    "singleFile": false,
    "format": "aama",
    "driver": "generic"
  },
  "materials": {
    "M": {
      "shrinkageWarp": 95,
      "shrinkageWeft": 96,
      "easeAdjWarp": 100,
      "easeAdjWeft": 100
    },
    "L": {
      "shrinkageWarp": 100,
      "shrinkageWeft": 100,
      "easeAdjWarp": 100,
      "easeAdjWeft": 100
    }
  },
  "nesting": {
    "sheetWidth": 140,
    "preNestRotation": 45,
    "partRotation": "+90",
    "partMargin": 1,
    "sheetLength": 3000,
    "sheetEdgeMargin": 10
  },
  "objects": ["ShirtFront", "ShirtBack"],
  "createdAt": "2018-08-24T09:51:18.376Z",
  "status": "completed",
  "files": [
    {
      "filename": "primary.dxf",
      "url": "https://path/to/primary.dxf"
    }
  ]
}