Introduction to the Web API
The Bespokify Web API allows clients to integrate their systems with our backend. There are a several API calls that we've implemented that grant users the possibility to interact with our backend in a multitude of ways.
This section of the documentation is oriented mainly to developers but this page defines some basic concepts and provides an overview of what the typical use case is for our API.
Essential Definitions
The following are a few terms that are important to understand when dealing with our API.
1. Pattern
A Pattern
is a piece of software created by our pattern engineers that represents an abstraction of a product (e.g. a shirt or a pair of jeans). Each pattern provides a set of options to customise that product. These options may include variants such as sleeve length, pocket placement, button size, etc.
A pattern also specifies the measurement inputs it requires in order to be successfully generated. These sets of body measurements may include neck, bust, waist, etc.
2. Draft
A draft
is the result of combining a pattern and its inputs (selected options and body measurements). When the input is provided to a pattern, it generates a draft which consists of the individual pieces that make up a product (e.g. the collar, sleeves, and front and back panels for a shirt). All of these pieces have defined values for their dimensions that were computed by the pattern's code.
3. Export
Lastly, an export
is a draft that has been turned into a file that can be read by a computer program or a manufactoring machine to produce a physical product. This export can be a DXF, PLT, PDF, or any other type of compatible file. Users have the option of printing it and give it to workers or use it directly in a compatible manufacturing machine for automated production.
Sample Workflow
The following is a brief sample workflow that should apply to most online retail cases.
- Receive an order for a product on your website or app.
- Send a request to our prediction endpoint with the body measurements provided by the customer to get back a complete set of measurement values. These can then be used as the measurement inputs for our patterns.
- Send a request to our pattern endpoint with the ID of the pattern your customer ordered. This will return the specs for that pattern which include the list of measurements it requires as well as the design options it provides.
- Make any necessary adjustments to the measurement values obtained in step 2 and decide on which options from step 3 to select for the pattern.
- Send a request to our draft endpoint with the ID of the pattern and the inputs from the previous step. This will return the ID of the generated draft.
- Send a request to our export endpoint with the draft ID from the previous step. Once the export is finished, a link to download the file will be provided. This file can then be used for production purposes.