Generate a Signature for File Uploads

Generate a Signature for File Uploads

Before files can be uploaded to the S3 bucket used by the MacroFab platform, a signature must be generated to authenticate the upload.

This endpoint returns a URI and policy document that must be included in the post to S3. For example:

const endpoint   = response.uri;
const formFields = response.form_fields;
const form       = new FormData();

Object.entries(formFields).forEach(([k, v]) => form.append(k, v));

form.append('file', file);

const fetchOpts = { 'method' : 'POST', 'timeout' : 5000, 'body' : form };

return fetch(endpoint, fetchOpts)
    .catch((error) => {
        if (DEBUG) {
            console.info('S3 upload post error', error);
        }
        throw new Error(error.message);
    });
get

Generate a signature for file uploads


Query Parameters

  • filename: required (string)

    The name of the file to be uploaded

    Example:

    Prop_Dev_Stick.tValues.27.grb
  • upload_type: required (string)

    The type of upload. Possible values, 'pcb'

    Example:

    pcb
  • pcb_id: required (string)

    When uploading "pcb" files, the PCB ID

    Example:

    k10hxm
  • pcb_revision: required (integer)

    When uploading "pcb" files, the PCB version or revision

    Example:

    1

HTTP status code 200

Body

Type: application/json

Example:

{
  "form_fields":{
    "key": "8BD9ACC8-8600-11E8-8FAB-ED23F32F0C57/Prop_Dev_Stick.tValues.27.grb",
    "policy": "eyJjb25kaXRpb25zIjpbeyJidWNrZXQiOiJtZi1wY2ItZmlsZS11cGxvYWQtZGV2In0seyJrZXkiOiI4QkQ5QUNDOC04NjAwLTExRTgtOEZBQi1FRDIzRjMyRjBDNTcvUHJvcF9EZXZfU3RpY2sudFZhbHVlcy4yNy5ncmIifSx7IngtYW16LWFsZ29yaXRobSI6IkFXUzQtSE1BQy1TSEEyNTYifSx7IngtYW16LWNyZWRlbnRpYWwiOiJBS0lBSU9RREZHU0NRTDc3WDIyUS8yMDE4MDcxMi91cy1lYXN0LTEvczMvYXdzNF9yZXF1ZXN0In0seyJ4LWFtei1kYXRlIjoiMjAxODA3MTJUMTgyMjMzWiJ9LHsieC1hbXotbWV0YS11c2VyLWlkIjoibTU4aHJrIn0seyJ4LWFtei1tZXRhLW9yZ2FuaXphdGlvbi1pZCI6Im1yMnJ0MiJ9LHsieC1hbXotbWV0YS1wY2ItaWQiOiJrMTBoeG0ifSx7IngtYW16LW1ldGEtcGNiLXJldmlzaW9uIjoiMSJ9XSwiZXhwaXJhdGlvbiI6IjIwMTgtMDctMTJUMTg6Mjc6MzNaIn0=",
    "x-amz-algorithm": "AWS4-HMAC-SHA256",
    "x-amz-credential": "AKIAIOQDFGSCQL77X22Q/20180712/us-east-1/s3/aws4_request",
    "x-amz-date": "20180712T182233Z",
    "x-amz-meta-organization-id": "mr2rt2",
    "x-amz-meta-pcb-id": "k10hxm",
    "x-amz-meta-pcb-revision": "1",
    "x-amz-meta-user-id": "m58hrk",
    "x-amz-signature": "03b62cbe2621ead5460908ebe0d79226fe3ae52f98ab816e1655a029b8cef1b6"
  },
  "uri": "https://mf-pcb-file-upload-dev.s3.amazonaws.com"
}

List PCB Projects

List PCB Projects

Returns a list of all PCB projects you own, with brief details and URIs to access complete details about each project.

get

Retrieve a list of all PCB Projects


Body

Type: text/plain

HTTP status code 200

Body

Type: application/json

Example:

{
  "pcb_list": [
    {
      "created": "2018-07-09 17:04:50",
      "description": null,
      "name": "New PCB",
      "pcb_id": "k10hxm",
      "preview": "1",
      "public": "0",
      "short": "A short description.",
      "uri": "/pcb/k10hxm",
      "user_id": "1",
      "version": "1"
    }
  ]
}

Manage PCB Projects (v2)

post

Create a new PCB Project.

You can specify the name of the PCB project and the short description of the project using a single JSON object passed as the body of the request. Responds with the full object definition of the PCB upon successful creation.


Body

Type: application/json

Example:

{
  "pcb": {
    "name": "The new name of the PCB",
    "short": "The new short description of the PCB"
  }
}

HTTP status code 200

Body

Type: application/json

Example:

{
  "pcb": {
    "pcb_id": "kpqt9m",
    "uri": "/pcb/kpqt9m"
  }
}

delete

Delete a PCB Project

When you delete a PCB project, you will no longer be able to access it, and orders referencing it may indicate that the associated PCB is "Deleted PCB"


URI Parameters

  • pcb_id: required (string)

HTTP status code 204

HTTP status code 404


get

Get Details about a PCB Project, Using the Newest Version

The full details about the PCB project will be returned when accessing this endpoint. Since there can be multiple versions of a PCB, retrieving only with pcb_id and without the pcb_version will return details about the newest version by default.

Included in the response will be details and access URIs for each specific version of the PCB project available.


URI Parameters

  • pcb_id: required (string)

HTTP status code 200

Body

Type: application/json

Example:

{
  "pcb": {
    "board": {
      "area": {
        "dims": [
          2.49,
          0.98
        ],
        "size": 3.962616
      },
      "customization_price": {
        "copper_weight": {
          "1 ounce": 0,
          "2 ounce": 96
        },
        "gold_fingers": {
          "0": 0,
          "1": 0
        },
        "impedance_control": {
          "0": 0,
          "1": 120
        },
        "manufacturing": {
          "Extended": 120,
          "Extended Drill": 120,
          "Extended/Extended Drill": 240,
          "Standard": 0
        },
        "thickness": {
          "2": {
            "max": 6.3,
            "min": 0.2
          },
          "4": {
            "max": 6.3,
            "min": 0.4
          },
          "6": {
            "max": 6.3,
            "min": 0.6
          },
          "8": {
            "max": 6.3,
            "min": 1
          }
        }
      },
      "specifications": {
        "copper_weight": "1 ounce",
        "gold_fingers": "0",
        "impedance_control": "0",
        "layer_count": "2",
        "manufacturing": "Standard",
        "silkscreen_color": "any",
        "soldermask_color": "any",
        "thickness": "1.6"
      }
    },
    "created": "2018-07-09 17:04:50",
    "creator": {
      "email": "user@macrofab.com",
      "first_name": "Handsome",
      "last_name": "User"
    },
    "cur_status": null,
    "current_version": 1,
    "description": null,
    "name": "New PCB",
    "notes": {
      "notes": "",
      "updated": "2018-07-09 17:04:50"
    },
    "organization_id": "mr2rt2",
    "pcb_id": "k10hxm",
    "preview": 1,
    "public": 0,
    "rotation_approved": 1,
    "selected_version": 1,
    "short": "A short description.",
    "user_id": "m58hrk",
    "versions": [
      {
        "board": {
          "area": {
            "dims": [
              2.49,
              0.98
            ],
            "size": 3.962616
          },
          "customization_price": {
            "copper_weight": {
              "1 ounce": 0,
              "2 ounce": 96
            },
            "gold_fingers": {
              "0": 0,
              "1": 0
            },
            "impedance_control": {
              "0": 0,
              "1": 120
            },
            "manufacturing": {
              "Extended": 120,
              "Extended Drill": 120,
              "Extended/Extended Drill": 240,
              "Standard": 0
            },
            "thickness": {
              "2": {
                "max": 6.3,
                "min": 0.2
              },
              "4": {
                "max": 6.3,
                "min": 0.4
              },
              "6": {
                "max": 6.3,
                "min": 0.6
              },
              "8": {
                "max": 6.3,
                "min": 1
              }
            }
          },
          "specifications": {
            "copper_weight": "1 ounce",
            "gold_fingers": "0",
            "impedance_control": "0",
            "layer_count": "2",
            "manufacturing": "Standard",
            "silkscreen_color": "any",
            "soldermask_color": "any",
            "thickness": "1.6"
          }
        },
        "date": "2018-07-09 17:04:50",
        "notes": {
          "notes": "",
          "updated": "2018-07-09 17:04:50"
        },
        "rotation_approved": 1,
        "status": [
          "nofiles"
        ],
        "uri": "/pcb/k10hxm/1",
        "version": 1
      }
    ]
  }
}

HTTP status code 404


put

Update a PCB Project.

The PCB Name and Short strings are shared by all versions of a PCB project. Using this method, you can update one or both of these strings for the PCB project using a single JSON object.


URI Parameters

  • pcb_id: required (string)

Body

Type: application/json

Example:

{
  "pcb": {
    "name": "The new name of the PCB",
    "short": "The new short description of the PCB"
  }
}

HTTP status code 200

Body

Type: application/json

Example:

{
  "pcb": {
    "board": {
      "area": {
        "dims": [
          2.49,
          0.98
        ],
        "size": 3.962616
      },
      "customization_price": {
        "copper_weight": {
          "1 ounce": 0,
          "2 ounce": 96
        },
        "gold_fingers": {
          "0": 0,
          "1": 0
        },
        "impedance_control": {
          "0": 0,
          "1": 120
        },
        "manufacturing": {
          "Extended": 120,
          "Extended Drill": 120,
          "Extended/Extended Drill": 240,
          "Standard": 0
        },
        "thickness": {
          "2": {
            "max": 6.3,
            "min": 0.2
          },
          "4": {
            "max": 6.3,
            "min": 0.4
          },
          "6": {
            "max": 6.3,
            "min": 0.6
          },
          "8": {
            "max": 6.3,
            "min": 1
          }
        }
      },
      "specifications": {
        "copper_weight": "1 ounce",
        "gold_fingers": "0",
        "impedance_control": "0",
        "layer_count": "2",
        "manufacturing": "Standard",
        "silkscreen_color": "any",
        "soldermask_color": "any",
        "thickness": "1.6"
      }
    },
    "created": "2018-07-09 17:04:50",
    "creator": {
      "email": "user@macrofab.com",
      "first_name": "Handsome",
      "last_name": "User"
    },
    "cur_status": null,
    "current_version": 1,
    "description": null,
    "name": "New PCB",
    "notes": {
      "notes": "",
      "updated": "2018-07-09 17:04:50"
    },
    "organization_id": "mr2rt2",
    "pcb_id": "k10hxm",
    "preview": 1,
    "public": 0,
    "rotation_approved": 1,
    "selected_version": 1,
    "short": "A short description.",
    "user_id": "m58hrk",
    "versions": [
      {
        "board": {
          "area": {
            "dims": [
              2.49,
              0.98
            ],
            "size": 3.962616
          },
          "customization_price": {
            "copper_weight": {
              "1 ounce": 0,
              "2 ounce": 96
            },
            "gold_fingers": {
              "0": 0,
              "1": 0
            },
            "impedance_control": {
              "0": 0,
              "1": 120
            },
            "manufacturing": {
              "Extended": 120,
              "Extended Drill": 120,
              "Extended/Extended Drill": 240,
              "Standard": 0
            },
            "thickness": {
              "2": {
                "max": 6.3,
                "min": 0.2
              },
              "4": {
                "max": 6.3,
                "min": 0.4
              },
              "6": {
                "max": 6.3,
                "min": 0.6
              },
              "8": {
                "max": 6.3,
                "min": 1
              }
            }
          },
          "specifications": {
            "copper_weight": "1 ounce",
            "gold_fingers": "0",
            "impedance_control": "0",
            "layer_count": "2",
            "manufacturing": "Standard",
            "silkscreen_color": "any",
            "soldermask_color": "any",
            "thickness": "1.6"
          }
        },
        "date": "2018-07-09 17:04:50",
        "notes": {
          "notes": "",
          "updated": "2018-07-09 17:04:50"
        },
        "rotation_approved": 1,
        "status": [
          "nofiles"
        ],
        "uri": "/pcb/k10hxm/1",
        "version": 1
      }
    ]
  }
}

HTTP status code 404


get

Get Details about a PCB Project, Specifying which Version to Retrieve.

Like getting a single PCB, this method returns full PCB details. However, you can specify a version to retrieve rather than retrieving only the newest version.


URI Parameters

  • pcb_id: required (string)
  • pcb_version: required (string)

HTTP status code 200

Body

Type: application/json

Example:

{
  "pcb": {
    "board": {
      "area": {
        "dims": [
          2.49,
          0.98
        ],
        "size": 3.962616
      },
      "customization_price": {
        "copper_weight": {
          "1 ounce": 0,
          "2 ounce": 96
        },
        "gold_fingers": {
          "0": 0,
          "1": 0
        },
        "impedance_control": {
          "0": 0,
          "1": 120
        },
        "manufacturing": {
          "Extended": 120,
          "Extended Drill": 120,
          "Extended/Extended Drill": 240,
          "Standard": 0
        },
        "thickness": {
          "2": {
            "max": 6.3,
            "min": 0.2
          },
          "4": {
            "max": 6.3,
            "min": 0.4
          },
          "6": {
            "max": 6.3,
            "min": 0.6
          },
          "8": {
            "max": 6.3,
            "min": 1
          }
        }
      },
      "specifications": {
        "copper_weight": "1 ounce",
        "gold_fingers": "0",
        "impedance_control": "0",
        "layer_count": "2",
        "manufacturing": "Standard",
        "silkscreen_color": "any",
        "soldermask_color": "any",
        "thickness": "1.6"
      }
    },
    "created": "2018-07-09 17:04:50",
    "creator": {
      "email": "user@macrofab.com",
      "first_name": "Handsome",
      "last_name": "User"
    },
    "cur_status": null,
    "current_version": 1,
    "description": null,
    "name": "New PCB",
    "notes": {
      "notes": "",
      "updated": "2018-07-09 17:04:50"
    },
    "organization_id": "mr2rt2",
    "pcb_id": "k10hxm",
    "preview": 1,
    "public": 0,
    "rotation_approved": 1,
    "selected_version": 1,
    "short": "A short description.",
    "user_id": "m58hrk",
    "versions": [
      {
        "board": {
          "area": {
            "dims": [
              2.49,
              0.98
            ],
            "size": 3.962616
          },
          "customization_price": {
            "copper_weight": {
              "1 ounce": 0,
              "2 ounce": 96
            },
            "gold_fingers": {
              "0": 0,
              "1": 0
            },
            "impedance_control": {
              "0": 0,
              "1": 120
            },
            "manufacturing": {
              "Extended": 120,
              "Extended Drill": 120,
              "Extended/Extended Drill": 240,
              "Standard": 0
            },
            "thickness": {
              "2": {
                "max": 6.3,
                "min": 0.2
              },
              "4": {
                "max": 6.3,
                "min": 0.4
              },
              "6": {
                "max": 6.3,
                "min": 0.6
              },
              "8": {
                "max": 6.3,
                "min": 1
              }
            }
          },
          "specifications": {
            "copper_weight": "1 ounce",
            "gold_fingers": "0",
            "impedance_control": "0",
            "layer_count": "2",
            "manufacturing": "Standard",
            "silkscreen_color": "any",
            "soldermask_color": "any",
            "thickness": "1.6"
          }
        },
        "date": "2018-07-09 17:04:50",
        "notes": {
          "notes": "",
          "updated": "2018-07-09 17:04:50"
        },
        "rotation_approved": 1,
        "status": [
          "nofiles"
        ],
        "uri": "/pcb/k10hxm/1",
        "version": 1
      }
    ]
  }
}

HTTP status code 404


get

Get Manufacturing Notes for a Specific PCB Version

The manufacturing notes for a project are displayed to line technicians during the assembly of your order. These should be used to help provide clarification for inobvious parts, or to assist with identification.

Do not use manufacturing notes to override placement or rotation data!


URI Parameters

  • pcb_id: required (string)
  • pcb_version: required (string)

HTTP status code 200

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "stringlist": {
      "type": "object",
      "properties": {
        "desc": {
          "type": "string",
          "description": "Type of items included in this list of text items"
        },
        "values": {
          "type": "array",
          "minItems": 0,
          "description": "String items returned",
          "items": { "type": "string"}
        }
      }
    }
  }
}

HTTP status code 404


put

Update Manufacturing Notes for a Specific PCB Version

The manufacturing notes for a project are displayed to line technicians during the assembly of your order. These should be used to help provide clarification for inobvious parts, or to assist with identification.

Do not use manufacturing notes to override placement or rotation data!


URI Parameters

  • pcb_id: required (string)
  • pcb_version: required (string)

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "pcb_notes": {
      "type": "object",
      "properties": {
        "notes": { "type": "string", "description": "Manufacturing Notes"}
      }
    }
  }
}

HTTP status code 204

HTTP status code 404


get

Get List of PCB Version Project Files

Returns a list of all files currently uploaded and recognized for the specified PCB project version.


URI Parameters

  • pcb_id: required (string)
  • pcb_version: required (string)

HTTP status code 200

Body

Type: application/json

Example:

{
  "pcb_layers": [
    {
      "files": [
        {
          "basename": "pcbtop.svg",
          "key": "mv8ptg/pcbs/k10hxm/1/processed/pcbtop.svg",
          "layer": "all_top",
          "modified": "Mon, 24 Sep 2018 21:55:26 GMT",
          "preview": {
            "basename": "pcbtop.svg",
            "key": "mv8ptg/pcbs/k10hxm/1/processed/pcbtop.svg",
            "layer": "all_top",
            "modified": "Mon, 24 Sep 2018 21:55:26 GMT",
            "size": 275571,
            "state": "processed",
            "type": "svg"
          },
          "size": 275571,
          "state": "processed",
          "thumbnail": {
            "basename": "pcbtop.png",
            "key": "mv8ptg/pcbs/k10hxm/1/processed/pcbtop.png",
            "layer": "all_top",
            "modified": "Mon, 24 Sep 2018 21:55:27 GMT",
            "size": 98021,
            "state": "processed",
            "type": "png_image"
          },
          "type": "svg"
        }
      ],
      "id": "all_top",
      "name": "Top Preview",
      "side": "top"
    },
    {
      "files": [
        {
          "basename": "pcb.bor",
          "key": "mv8ptg/pcbs/k10hxm/1/processed/pcb.bor",
          "layer": "board_outline",
          "modified": "Mon, 24 Sep 2018 21:55:23 GMT",
          "preview": {
            "basename": "pcb.bor.svg",
            "key": "mv8ptg/pcbs/k10hxm/1/processed/pcb.bor.svg",
            "layer": "board_outline",
            "modified": "Mon, 24 Sep 2018 21:55:24 GMT",
            "size": 434,
            "state": "processed",
            "type": "svg"
          },
          "size": 100,
          "state": "processed",
          "thumbnail": {
            "basename": "pcb.bor.png",
            "key": "mv8ptg/pcbs/k10hxm/1/processed/pcb.bor.png",
            "layer": "board_outline",
            "modified": "Mon, 24 Sep 2018 21:55:26 GMT",
            "size": 1191,
            "state": "processed",
            "type": "png_image"
          },
          "type": "gerber"
        }
      ],
      "id": "board_outline",
      "name": "Board Outline",
      "side": "both"
    },
    {
      "files": [
        {
          "basename": "pcb.gtp",
          "key": "mv8ptg/pcbs/k10hxm/1/processed/pcb.gtp",
          "layer": "top_paste",
          "modified": "Mon, 24 Sep 2018 21:55:23 GMT",
          "preview": {
            "basename": "pcb.gtp.svg",
            "key": "mv8ptg/pcbs/k10hxm/1/processed/pcb.gtp.svg",
            "layer": "top_paste",
            "modified": "Mon, 24 Sep 2018 21:55:23 GMT",
            "size": 8506,
            "state": "processed",
            "type": "svg"
          },
          "size": 2504,
          "state": "processed",
          "thumbnail": {
            "basename": "pcb.gtp.png",
            "key": "mv8ptg/pcbs/k10hxm/1/processed/pcb.gtp.png",
            "layer": "top_paste",
            "modified": "Mon, 24 Sep 2018 21:55:24 GMT",
            "size": 10775,
            "state": "processed",
            "type": "png_image"
          },
          "type": "gerber"
        }
      ],
      "id": "top_paste",
      "name": "Top Paste",
      "side": "top"
    },
    {
      "files": [
        {
          "basename": "pcb.gto",
          "key": "mv8ptg/pcbs/k10hxm/1/processed/pcb.gto",
          "layer": "top_silkscreen",
          "modified": "Mon, 24 Sep 2018 21:55:23 GMT",
          "preview": {
            "basename": "pcb.gto.svg",
            "key": "mv8ptg/pcbs/k10hxm/1/processed/pcb.gto.svg",
            "layer": "top_silkscreen",
            "modified": "Mon, 24 Sep 2018 21:55:24 GMT",
            "size": 58471,
            "state": "processed",
            "type": "svg"
          },
          "size": 41492,
          "state": "processed",
          "thumbnail": {
            "basename": "pcb.gto.png",
            "key": "mv8ptg/pcbs/k10hxm/1/processed/pcb.gto.png",
            "layer": "top_silkscreen",
            "modified": "Mon, 24 Sep 2018 21:55:25 GMT",
            "size": 13984,
            "state": "processed",
            "type": "png_image"
          },
          "type": "gerber"
        }
      ],
      "id": "top_silkscreen",
      "name": "Top Silkscreen",
      "side": "top"
    },
    {
      "files": [
        {
          "basename": "pcb.gts",
          "key": "mv8ptg/pcbs/k10hxm/1/processed/pcb.gts",
          "layer": "top_soldermask",
          "modified": "Mon, 24 Sep 2018 21:55:23 GMT",
          "preview": {
            "basename": "pcb.gts.svg",
            "key": "mv8ptg/pcbs/k10hxm/1/processed/pcb.gts.svg",
            "layer": "top_soldermask",
            "modified": "Mon, 24 Sep 2018 21:55:23 GMT",
            "size": 11182,
            "state": "processed",
            "type": "svg"
          },
          "size": 3187,
          "state": "processed",
          "thumbnail": {
            "basename": "pcb.gts.png",
            "key": "mv8ptg/pcbs/k10hxm/1/processed/pcb.gts.png",
            "layer": "top_soldermask",
            "modified": "Mon, 24 Sep 2018 21:55:27 GMT",
            "size": 36793,
            "state": "processed",
            "type": "png_image"
          },
          "type": "gerber"
        }
      ],
      "id": "top_soldermask",
      "name": "Top Soldermask",
      "side": "top"
    },
    {
      "files": [
        {
          "basename": "pcb.gtl",
          "key": "mv8ptg/pcbs/k10hxm/1/processed/pcb.gtl",
          "layer": "top_copper",
          "modified": "Mon, 24 Sep 2018 21:55:23 GMT",
          "preview": {
            "basename": "pcb.gtl.svg",
            "key": "mv8ptg/pcbs/k10hxm/1/processed/pcb.gtl.svg",
            "layer": "top_copper",
            "modified": "Mon, 24 Sep 2018 21:55:24 GMT",
            "size": 66398,
            "state": "processed",
            "type": "svg"
          },
          "size": 67171,
          "state": "processed",
          "thumbnail": {
            "basename": "pcb.gtl.png",
            "key": "mv8ptg/pcbs/k10hxm/1/processed/pcb.gtl.png",
            "layer": "top_copper",
            "modified": "Mon, 24 Sep 2018 21:55:28 GMT",
            "size": 107271,
            "state": "processed",
            "type": "png_image"
          },
          "type": "gerber"
        }
      ],
      "id": "top_copper",
      "name": "Top Copper",
      "side": "top"
    },
    {
      "files": [
        {
          "basename": "pcb.gbl",
          "key": "mv8ptg/pcbs/k10hxm/1/processed/pcb.gbl",
          "layer": "bottom_copper",
          "modified": "Mon, 24 Sep 2018 21:55:23 GMT",
          "preview": {
            "basename": "pcb.gbl.svg",
            "key": "mv8ptg/pcbs/k10hxm/1/processed/pcb.gbl.svg",
            "layer": "bottom_copper",
            "modified": "Mon, 24 Sep 2018 21:55:24 GMT",
            "size": 55651,
            "state": "processed",
            "type": "svg"
          },
          "size": 56873,
          "state": "processed",
          "thumbnail": {
            "basename": "pcb.gbl.png",
            "key": "mv8ptg/pcbs/k10hxm/1/processed/pcb.gbl.png",
            "layer": "bottom_copper",
            "modified": "Mon, 24 Sep 2018 21:55:25 GMT",
            "size": 83987,
            "state": "processed",
            "type": "png_image"
          },
          "type": "gerber"
        },
        {
          "basename": "Prop_Dev_Stick.Bottom.16.gbl",
          "key": "mv8ptg/pcbs/k10hxm/1/processed/Prop_Dev_Stick.Bottom.16.gbl",
          "layer": "bottom_copper",
          "modified": "Mon, 24 Sep 2018 21:55:22 GMT",
          "preview": {
            "basename": "Prop_Dev_Stick.Bottom.16.gbl.svg",
            "key": "mv8ptg/pcbs/k10hxm/1/processed/Prop_Dev_Stick.Bottom.16.gbl.svg",
            "layer": "bottom_copper",
            "modified": "Mon, 24 Sep 2018 21:55:24 GMT",
            "size": 65935,
            "state": "processed",
            "type": "svg"
          },
          "size": 54552,
          "state": "processed",
          "thumbnail": {
            "basename": "Prop_Dev_Stick.Bottom.16.gbl.png",
            "key": "mv8ptg/pcbs/k10hxm/1/processed/Prop_Dev_Stick.Bottom.16.gbl.png",
            "layer": "bottom_copper",
            "modified": "Mon, 24 Sep 2018 21:55:28 GMT",
            "size": 81409,
            "state": "processed",
            "type": "png_image"
          },
          "type": "gerber"
        }
      ],
      "id": "bottom_copper",
      "name": "Bottom Copper",
      "side": "bottom"
    },
    {
      "files": [
        {
          "basename": "pcb.gbs",
          "key": "mv8ptg/pcbs/k10hxm/1/processed/pcb.gbs",
          "layer": "bottom_soldermask",
          "modified": "Mon, 24 Sep 2018 21:55:23 GMT",
          "preview": {
            "basename": "pcb.gbs.svg",
            "key": "mv8ptg/pcbs/k10hxm/1/processed/pcb.gbs.svg",
            "layer": "bottom_soldermask",
            "modified": "Mon, 24 Sep 2018 21:55:24 GMT",
            "size": 7675,
            "state": "processed",
            "type": "svg"
          },
          "size": 2092,
          "state": "processed",
          "thumbnail": {
            "basename": "pcb.gbs.png",
            "key": "mv8ptg/pcbs/k10hxm/1/processed/pcb.gbs.png",
            "layer": "bottom_soldermask",
            "modified": "Mon, 24 Sep 2018 21:55:26 GMT",
            "size": 29504,
            "state": "processed",
            "type": "png_image"
          },
          "type": "gerber"
        }
      ],
      "id": "bottom_soldermask",
      "name": "Bottom Soldermask",
      "side": "bottom"
    },
    {
      "files": [
        {
          "basename": "pcb.gbo",
          "key": "mv8ptg/pcbs/k10hxm/1/processed/pcb.gbo",
          "layer": "bottom_silkscreen",
          "modified": "Mon, 24 Sep 2018 21:55:22 GMT",
          "preview": {
            "basename": "pcb.gbo.svg",
            "key": "mv8ptg/pcbs/k10hxm/1/processed/pcb.gbo.svg",
            "layer": "bottom_silkscreen",
            "modified": "Mon, 24 Sep 2018 21:55:23 GMT",
            "size": 12379,
            "state": "processed",
            "type": "svg"
          },
          "size": 15186,
          "state": "processed",
          "thumbnail": {
            "basename": "pcb.gbo.png",
            "key": "mv8ptg/pcbs/k10hxm/1/processed/pcb.gbo.png",
            "layer": "bottom_silkscreen",
            "modified": "Mon, 24 Sep 2018 21:55:25 GMT",
            "size": 8077,
            "state": "processed",
            "type": "png_image"
          },
          "type": "gerber"
        }
      ],
      "id": "bottom_silkscreen",
      "name": "Bottom Silkscreen",
      "side": "bottom"
    },
    {
      "files": [
        {
          "basename": "pcb.gbp",
          "key": "mv8ptg/pcbs/k10hxm/1/processed/pcb.gbp",
          "layer": "bottom_paste",
          "modified": "Mon, 24 Sep 2018 21:55:23 GMT",
          "preview": {
            "basename": "pcb.gbp.svg",
            "key": "mv8ptg/pcbs/k10hxm/1/processed/pcb.gbp.svg",
            "layer": "bottom_paste",
            "modified": "Mon, 24 Sep 2018 21:55:23 GMT",
            "size": 4977,
            "state": "processed",
            "type": "svg"
          },
          "size": 1409,
          "state": "processed",
          "thumbnail": {
            "basename": "pcb.gbp.png",
            "key": "mv8ptg/pcbs/k10hxm/1/processed/pcb.gbp.png",
            "layer": "bottom_paste",
            "modified": "Mon, 24 Sep 2018 21:55:26 GMT",
            "size": 6496,
            "state": "processed",
            "type": "png_image"
          },
          "type": "gerber"
        }
      ],
      "id": "bottom_paste",
      "name": "Bottom Paste",
      "side": "bottom"
    },
    {
      "files": [
        {
          "basename": "pcb.xln",
          "key": "mv8ptg/pcbs/k10hxm/1/processed/pcb.xln",
          "layer": "drill",
          "modified": "Mon, 24 Sep 2018 21:55:23 GMT",
          "preview": {
            "basename": "pcb.xln.svg",
            "key": "mv8ptg/pcbs/k10hxm/1/processed/pcb.xln.svg",
            "layer": "drill",
            "modified": "Mon, 24 Sep 2018 21:55:24 GMT",
            "size": 6901,
            "state": "processed",
            "type": "svg"
          },
          "size": 2019,
          "state": "processed",
          "thumbnail": {
            "basename": "pcb.xln.png",
            "key": "mv8ptg/pcbs/k10hxm/1/processed/pcb.xln.png",
            "layer": "drill",
            "modified": "Mon, 24 Sep 2018 21:55:25 GMT",
            "size": 6215,
            "state": "processed",
            "type": "png_image"
          },
          "type": "excellon"
        }
      ],
      "id": "drill",
      "name": "Drills",
      "side": "both"
    },
    {
      "files": [],
      "id": "unknown",
      "name": "Unassigned Files",
      "side": "none"
    },
    {
      "files": [
        {
          "basename": "pcbbottom.png",
          "key": "mv8ptg/pcbs/k10hxm/1/processed/pcbbottom.png",
          "layer": "all_bottom",
          "modified": "Mon, 24 Sep 2018 21:55:27 GMT",
          "preview": {
            "basename": "pcbbottom.svg",
            "key": "mv8ptg/pcbs/k10hxm/1/processed/pcbbottom.svg",
            "layer": "all_bottom",
            "modified": "Mon, 24 Sep 2018 21:55:26 GMT",
            "size": 268082,
            "state": "processed",
            "type": "svg"
          },
          "size": 74806,
          "state": "processed",
          "thumbnail": {
            "basename": "pcbbottom.png",
            "key": "mv8ptg/pcbs/k10hxm/1/processed/pcbbottom.png",
            "layer": "all_bottom",
            "modified": "Mon, 24 Sep 2018 21:55:27 GMT",
            "size": 74806,
            "state": "processed",
            "type": "png_image"
          },
          "type": "png_image"
        }
      ],
      "id": "all_bottom",
      "name": "Bottom Preview",
      "side": "bottom"
    }
  ]
}

HTTP status code 404


get

Retrieve Combined BoM and Placement Data

By Default, the Bill of Materials and Placement Data express the EDA-defined data about your board. This data is essential for the production of your PCB. Within this data is critical information about each component, it's X and Y center (in thousandths of an inch), and the pad width and height of the component (in thousandths of an inch).


URI Parameters

  • pcb_id: required (string)
  • pcb_version: required (string)

HTTP status code 200

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "pcb_xyrs": {
      "type": "array",
      "minItems": 1,
      "items": [
        {
          "designator": { "type": "string", "description": "The designator for the component"},
          "x_loc": { "type": "number", "description": "The center location (X) of the component, in thousandths of an inch"},
          "y_loc": { "type": "number", "description": "The center location (Y) of the component, in thousandths of an inch"},
          "rotation": { "type": "number", "description": "The rotation of the component, with 0 degrees indicating the locating pin is nearest to the top-left of the component looking from the top of the board"},
          "board_side": {"type": "number", "description": "1 = top, 2 = bottom"},
          "component_type": { "type": "number", "description": "1 = SMD, 2 = PTH"},
          "x_size": { "type": "number", "description": "The width of the entire area taken up by the pads of the component, in thousandths of an inch"},
          "y_size": { "type": "number", "description": "The height of the entire area taken up by the pads of the component, in thousandths of an inch"},
          "value": { "type": "string", "description": "The value for the part"},
          "footprint": { "type": "string", "description": "The name of the part footprint"}
        }
      ]
    }
  }
}

HTTP status code 404


post

Provide or Overwrite The XYRS Data for the PCB Version

By Default, the Bill of Materials and Placement Data express the EDA-defined data about your board. This data is essential for the production of your PCB. Within this data is critical information about each component, it's X and Y center (in thousandths of an inch), and the pad width and height of the component (in thousandths of an inch).

This method completely overwrites the existing XYRS data for the specified version of the PCB project, or provides the data if it does not exist.

You must provide for each component all of the following values:

  • designator
    • The unique designator for the component
    • e.g.: 'R1', 'C23', etc.
  • x_loc
    • The X-location of the center of the component, in thousandths of an inch
    • 0,0 location is the bottom-left of the PCB at the center of the board outline
    • e.g.: 1023, 59.5, etc.
  • y_loc
    • The Y-location of the center of the component, in thousandths of an inch
    • 0,0 location is the bottom-left of the PCB at the center of the board outline
    • e.g.: 1023, 59.5, etc.
  • rotation
    • The rotation of the component
    • Rotation is clockwise
    • Zero rotation (0) assumes that locating pin on the component is at or nearest to the top-left, 180 assumes bottom-right
  • board_side
    • Which side of the board the component is on
    • 1 = top, 2 = bottom
  • component_type
    • What type of component is this?
    • 1 = SMD, 2 = PTH
  • x_size
    • The width of a box which just contains all pads (e.g. the "pad width") in thousandths of an inch
    • This data is used to display the component on the placement tab in the UI
    • If you cannot extract this data from your EDA tool, specify any value which is neither too large nor too small to effectively manage rotation in the UI
  • y_size
    • The height of a box which just contains all pads (e.g. the "pad height") in thousandths of an inch
    • This data is used to display the component on the placement tab in the UI
    • If you cannot extract this data from your EDA tool, specify any value which is neither too large nor too small to effectively manage rotation in the UI
  • value
    • The component value
    • The system will automatically match this field for a manufacturer's part number and select that component if it is available on the market
      • To perform automatic matching, provide the exact part number, e.g. "FOO-12235.111/EX"
    • For parts such as resistors and capacitors, the system will automatically combine the value and footprint to search for "nearest compatible" house parts
  • footprint
    • The footprint for the part
    • e.g. "R0402", "C0603", "SOT-23-3", etc.

URI Parameters

  • pcb_id: required (string)
  • pcb_version: required (string)

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "pcb_xyrs": {
      "type": "array",
      "minItems": 1,
      "items": [
        {
          "designator": { "type": "string", "description": "The designator for the component"},
          "x_loc": { "type": "number", "description": "The center location (X) of the component, in thousandths of an inch"},
          "y_loc": { "type": "number", "description": "The center location (Y) of the component, in thousandths of an inch"},
          "rotation": { "type": "number", "description": "The rotation of the component, with 0 degrees indicating the locating pin is nearest to the top-left of the component looking from the top of the board"},
          "board_side": {"type": "number", "description": "1 = top, 2 = bottom"},
          "component_type": { "type": "number", "description": "1 = SMD, 2 = PTH"},
          "x_size": { "type": "number", "description": "The width of the entire area taken up by the pads of the component, in thousandths of an inch"},
          "y_size": { "type": "number", "description": "The height of the entire area taken up by the pads of the component, in thousandths of an inch"},
          "value": { "type": "string", "description": "The value for the part"},
          "footprint": { "type": "string", "description": "The name of the part footprint"}
        }
      ]
    }
  }
}

HTTP status code 200

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "pcb_xyrs": {
      "type": "array",
      "minItems": 1,
      "items": [
        {
          "designator": { "type": "string", "description": "The designator for the component"},
          "x_loc": { "type": "number", "description": "The center location (X) of the component, in thousandths of an inch"},
          "y_loc": { "type": "number", "description": "The center location (Y) of the component, in thousandths of an inch"},
          "rotation": { "type": "number", "description": "The rotation of the component, with 0 degrees indicating the locating pin is nearest to the top-left of the component looking from the top of the board"},
          "board_side": {"type": "number", "description": "1 = top, 2 = bottom"},
          "component_type": { "type": "number", "description": "1 = SMD, 2 = PTH"},
          "x_size": { "type": "number", "description": "The width of the entire area taken up by the pads of the component, in thousandths of an inch"},
          "y_size": { "type": "number", "description": "The height of the entire area taken up by the pads of the component, in thousandths of an inch"},
          "value": { "type": "string", "description": "The value for the part"},
          "footprint": { "type": "string", "description": "The name of the part footprint"}
        }
      ]
    }
  }
}

HTTP status code 400

Body

Type: application/json

Schema:


  {

    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "properties": {
      "error": {
        "type": "object",
        "properties": {
          "code": {
            "description": "A unique error code",
            "type": "text"
          },
          "text": {
            "type": "array",
            "description": "List of error detail strings",
            "minItems": 0,
            "items": { "type": "string"}
          }
        }
      }
    }
  }

HTTP status code 404


get

Get Placement Data for a PCB Project

Using this method, you can retrieve the placement data for all components used in a particular version of a PCB project.


URI Parameters

  • pcb_id: required (string)
  • pcb_version: required (string)

HTTP status code 200

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "placements": {
      "type": "array",
      "items": [
        {
          "pcb_id": { "type": "string" },
          "part": { "type": "string" },
          "x_origin": { "type": "string" },
          "y_origin": { "type": "string" },
          "x_offset": { "type": "string" },
          "y_offset": { "type": "string" },
          "rotation": { "type": "string" },
          "rotation_offset": { "type": "string" },
          "flipped": { "type": "string" },
          "pad_width": { "type": "string" },
          "pad_height": { "type": "string" },
          "type": { "type": "string" },
          "side": { "type": "string" }
        }
      ]
    }
  }
}

HTTP status code 404


post

Update Part Placement Data for a PCB Project

Using this method, you can update the following attributes of placement for one or more parts:

  • x_origin The X center of the part, located from the bottom-left corner in thousandths of an inch (mils)
  • y_origin The Y center of the part, located from the bottom-left corner in thousandths of an inch (mils)
  • x_offset The offset to apply to the X center of the part, in thousandths of an inch (mils)
  • y_offset The offset to apply to the Y center of the part, in thousandths of an inch (mils)
  • rotation The rotation of the part
  • rotation_offset The offset (in degrees) to apply to the rotation of the part
  • pad_width The width of a bounding box that encompasses all pads on the part, in thousandths of an inch
  • pad_height The height of a bounding box that encompasses all pads on the part, in thousandths of an inch
  • type The type of the part 1 = SMD, 2 = PTH
  • side The side of the board 1 = Top, 2 = Bottom

URI Parameters

  • pcb_id: required (string)
  • pcb_version: required (string)

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "placements": {
      "type": "array",
      "items": [
        {
          "part": { "type": "string" },
          "x_origin": { "type": "string" },
          "y_origin": { "type": "string" },
          "x_offset": { "type": "string" },
          "y_offset": { "type": "string" },
          "rotation": { "type": "string" },
          "rotation_offset": { "type": "string" },
          "flipped": { "type": "string" },
          "pad_width": { "type": "string" },
          "pad_height": { "type": "string" },
          "type": { "type": "string" },
          "side": { "type": "string" }
        }
      ]
    }
  }
}

HTTP status code 200

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "placements": {
      "type": "array",
      "items": [
        {
          "pcb_id": { "type": "string" },
          "part": { "type": "string" },
          "x_origin": { "type": "string" },
          "y_origin": { "type": "string" },
          "x_offset": { "type": "string" },
          "y_offset": { "type": "string" },
          "rotation": { "type": "string" },
          "rotation_offset": { "type": "string" },
          "flipped": { "type": "string" },
          "pad_width": { "type": "string" },
          "pad_height": { "type": "string" },
          "type": { "type": "string" },
          "side": { "type": "string" }
        }
      ]
    }
  }
}

HTTP status code 404


post

Approve Placement Data for a PCB Project You must approve placement data before a PCB project can be manufactured. If you make any changes to the BoM, or to placement data, you must re-approve placement again.


URI Parameters

  • pcb_id: required (string)
  • pcb_version: required (string)

Body

Type: text/plain

HTTP status code 200

HTTP status code 404


Manage PCB Projects (v3)

post

Add a new version to a PCB project.

PCB project versions allow you to specify variants and changes to the gerber data, bill of materials, or placement data. Once you have created a new PCB version, you can then upload new files or create a new bill of materials under that PCB version.


URI Parameters

  • pcb_id: required (string)
  • pcb_version: required (string)

HTTP status code 200

Body

Type: application/json

Example:

{
  "newRevisionUri": "/pcb/k10hxm/2"
}

get

Get a Specific PCB File

Returns the contents of a PCB file


URI Parameters

  • pcb_id: required (string)
  • pcb_version: required (string)
  • status: required (string)
  • file_name: required (string)

HTTP status code 200

Body

Type: text/plain

Type: application/svg+xml

HTTP status code 404


get

Retrieve the PCB Bill of Materials for a Specific Version.

The bom key points to an array of bill of materials entries, one for each component listed on the board. Each element is an object that describes that component. While several of the object keys are obvious in their meaning, some require more detail:

populate

The populate key indicates whether you have specified that the particular instance of that component be populated on the board. By default, it is set to true, unless you have unchecked the populate option for this component in the Bill of Materials view for the PCB in the user interface. This key having a value of true does not, however, ensure the part's population in assembly. The component must also have either a matched, selected, or house part associated with it.

selected_part, selected_mpn

A single MPN can be manufactured by a number of vendors, so we assign every part a unique ID. The ID for an MPN can be discovered through parts searches.

For convenience, we return the MPN with the results.


URI Parameters

  • pcb_id: required (string)
  • pcb_version: required (string)

HTTP status code 200

Body

Type: application/json

Example:

{
  "bom": {
    "approved_vendors": [],
    "created": "Mon, 09 Jul 2018 16:48:09 GMT",
    "id": "b72eafe88428444b980a09d2def93216",
    "name": "Automatically generated BOM from XYRS for PCB 1",
    "notes": null,
    "organizations": [
      "mr2rt2"
    ],
    "parts": [
      {
        "allow_substitute": true,
        "alternate_parts": [],
        "created": "Mon, 09 Jul 2018 16:48:09 GMT",
        "description": null,
        "device": ".1uF",
        "group_key": null,
        "mpn": null,
        "notes": null,
        "origin": "turnkey",
        "package": "0603",
        "part": "C10",
        "populate": true,
        "record_num": 26,
        "selected_mpn": null,
        "selected_part": "MF-CAP-0603-0.1uF",
        "updated": "Mon, 09 Jul 2018 17:28:11 GMT",
        "uri": "/api/v3/bom/b72eafe88428444b980a09d2def93216/1/part/C10",
        "value": ".1uF"
      },
      {
        "allow_substitute": true,
        "alternate_parts": [],
        "created": "Mon, 09 Jul 2018 16:48:09 GMT",
        "description": null,
        "device": ".1uF",
        "group_key": null,
        "mpn": null,
        "notes": null,
        "origin": "turnkey",
        "package": "0603",
        "part": "C11",
        "populate": true,
        "record_num": 27,
        "selected_mpn": null,
        "selected_part": "MF-CAP-0603-0.1uF",
        "updated": "Mon, 09 Jul 2018 17:28:11 GMT",
        "uri": "/api/v3/bom/b72eafe88428444b980a09d2def93216/1/part/C11",
        "value": ".1uF"
      },
      {
        "allow_substitute": true,
        "alternate_parts": [],
        "created": "Mon, 09 Jul 2018 16:48:09 GMT",
        "description": null,
        "device": "NCP1117LPST33T3G",
        "group_key": null,
        "mpn": null,
        "notes": null,
        "origin": "turnkey",
        "package": "SOT-223-3",
        "part": "U6",
        "populate": false,
        "record_num": 44,
        "selected_mpn": "NCP1117LPST33T3G",
        "selected_part": "c21b4122-c383-561e-8e80-d9cfa635e28a",
        "updated": "Mon, 09 Jul 2018 17:28:47 GMT",
        "uri": "/api/v3/bom/b72eafe88428444b980a09d2def93216/1/part/U6",
        "value": "NCP1117LPST33T3G"
      }
    ],
    "updated": "Mon, 09 Jul 2018 16:48:09 GMT",
    "uri": "/api/v3/bom/b72eafe88428444b980a09d2def93216/1",
    "usage": {
      "pcbs": [],
      "products": []
    },
    "user_id": "m58hrk",
    "version": 1
  }
}

HTTP status code 404


post

Adds or replaces an entire bill of materials.

Using this endpoint, you can create an entirely new bill of materials.

  • record_num Required. The row number of the item. This value is zero-indexed and should increment by 1 for each item.

  • part Required. The part/designator (e.g. 'C1') for the item.

  • origin Required. The origin of this item. Valid values are market, consignment, inventory.

  • value The value (e.g. '1K') for the item.

  • package The package type (e.g. '0402') for the item.

  • populate Whether or not this part should be populated on the board.

  • mpn The primary MPN of the part from the market to use for this item.

  • selected_part The UUID (or house part number) that should be used for this item.

  • selected_mpn The MPN for the selected part.

You must specify row_num, part, and origin.


URI Parameters

  • pcb_id: required (string)
  • pcb_version: required (string)

Body

Type: application/json

Example:

{
  "parts": [
    {
      "mpn": null,
      "origin": "turnkey",
      "package": "0603",
      "part": "C10",
      "populate": true,
      "record_num": 1,
      "selected_mpn": null,
      "selected_part": "MF-CAP-0603-0.1uF",
      "value": ".1uF"
    },
    {
      "device": "NCP1117LPST33T3G",
      "mpn": null,
      "origin": "turnkey",
      "package": "SOT-223-3",
      "part": "U6",
      "populate": false,
      "record_num": 2,
      "selected_mpn": "NCP1117LPST33T3G",
      "selected_part": "c21b4122-c383-561e-8e80-d9cfa635e28a",
      "value": "NCP1117LPST33T3G"
    }
  ]
}

HTTP status code 204

HTTP status code 404


put

Update Specific Bill of Materials Items for a Version of a PCB Project

Using this endpoint, you can modify the attributes of an item in your bill of materials. Namely, you can change the following:

  • value The value (e.g. '1K') for the item.

  • package The package type (e.g. '0402') for the item.

  • populate Whether or not this part should be populated on the board, 0 = no, 1 = yes

  • selected_part The MPN of the part from the market to use for this BoM item

You must specify one or more of these keys, if you do not specify a key, it will not be changed.


URI Parameters

  • pcb_id: required (string)
  • pcb_version: required (string)

Body

Type: application/json

Example:

{
  "parts": [
    {
        "mpn": null,
        "origin": "turnkey",
        "package": "0603",
        "part": "C10",
        "populate": true,
        "record_num": 1,
        "selected_mpn": "CAT24C512WI-GT3",
        "selected_part": "4342460a-59f2-5f1c-9ce5-642532888359",
        "value": ".1uF"
    }
  ]
}

HTTP status code 204

HTTP status code 404


get

Get Processing Errors for a Specific PCB Version

Returns a list of errors associated with the specific PCB version.


URI Parameters

  • pcb_id: required (string)
  • pcb_version: required (string)

HTTP status code 200

Body

Type: application/json

Example:

{
  "errors": [
    {
      "created": 1521119045,
      "created_by": "s3-png-generator",
      "id": "00fb3d46-462a-424b-8c52-808d51a039e8",
      "message": "There was an error generating thumbnail images for your PCB.",
      "organization_id": "m73h8m",
      "type": "PCB",
      "type_id": "2696id",
      "type_version": "1"
    },
    {
      "created": 1521119044,
      "created_by": "s3-png-generator",
      "id": "072fe0f9-b01e-4b23-a463-70b70859754d",
      "message": "There was an error generating thumbnail images for your PCB.",
      "organization_id": "m73h8m",
      "type": "PCB",
      "type_id": "2696id",
      "type_version": "1"
    }
  ]
}

HTTP status code 404


post

Acknowledge Processing Errors for a Specific PCB Version


URI Parameters

  • pcb_id: required (string)
  • pcb_version: required (string)
  • error_id: required (string)

HTTP status code 200

Body

Type: application/json


get

Get Manufacturability Status for a PCB


URI Parameters

  • pcb_id: required (string)
  • pcb_version: required (string)
  • quantity: required (string)

HTTP status code 200

Body

Type: application/json

Example:

{
  "errors": {
    "availability": {
      "production": [
        "M20-7822046",
        "P8X32A-Q44",
        "MAX11613EUA+"
      ],
      "prototype": [
        "M20-7822046",
        "P8X32A-Q44",
        "MAX11613EUA+"
      ]
    }
  },
  "manufacturable": {
    "production": false,
    "prototype": false
  }
}

get

Retrieve a Quote for a PCB with a Specific Version.

Retrieves a quote for a PCB with a specific version, returning total price, unit parts/labor costs, and manufacturing specifications.


URI Parameters

  • pcb_id: required (string)
  • pcb_version: required (string)

Query Parameters

  • layer_count: (integer)

    Provide a value of 2, 4, 6, or 8.

    Example:

    4
  • soldermask_color: (string)

    Provide a value of any, red, green, blue, yellow, black, or white.

    Example:

    any
  • silkscreen_color: (string)

    Provide a value of any, red, green, blue, yellow, black, or white.

    Example:

    any
  • impedance_control: (integer)

    Provide a value of 0 or 1.

  • copper_weight: (string)

    Provide a value of 1 ounce or 2 ounce.

    Example:

    1 ounce
  • manufacturing: (string)

    Provide a value of Standard or Extended.

    Example:

    Extended
  • quantity: (integer)

    Provide a value >= 1.

    Example:

    10

HTTP status code 200

Body

Type: application/json

Example:

{
  "quote": {
    "best": {},
    "components": [],
    "facility": "us.tx.hou.1",
    "labor": {},
    "lead_time": {},
    "nre": {},
    "other_fees": {},
    "pcb": {},
    "placements": {},
    "plots": [],
    "quantity": 1,
    "tier": "prototype",
    "totals": {}
  }
}

HTTP status code 400

Body

Type: application/json

Schema:


  {

    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "properties": {
      "error": {
        "type": "object",
        "properties": {
          "code": {
            "description": "A unique error code",
            "type": "text"
          },
          "text": {
            "type": "array",
            "description": "List of error detail strings",
            "minItems": 0,
            "items": { "type": "string"}
          }
        }
      }
    }
  }

HTTP status code 404


Find and Display a Part

get

Display a Part


URI Parameters

  • part_num: required (string)

HTTP status code 200

Body

Type: application/json

Example:

{
  "part": {
    "attributes": [],
      "availability": {
        "preferred": {
          "lead_time": null,
          "moq": 1,
          "stock": 1000000000
        },
        "standard": {
          "lead_time": null,
          "moq": null,
          "stock": 0
        }
      },
      "class": "resistor",
      "datasheets": [
        "https://s3.amazonaws.com/devpublic1/datasheets/Panasonic_TF_Resistors.pdf"
      ],
      "description": "Resistor Thick Film 0603 10K Ohm 5% 100mW 75V",
      "footprints": [
        {
          "cad_library": "R0402.png",
          "cad_library_name": "R0402",
          "cad_library_uri": "https://s3.amazonaws.com/devpublic1/libraries/Eagle/R0402.png",
          "cad_program": "Eagle"
        }
      ],
      "form_factor": {
        "pins": "2",
        "type": "SMD"
      },
      "house": true,
      "images": {
        "thumbnail": "https://s3.amazonaws.com/devpublic1/thumbnails/99D4874C-32FA-11E4-8499-A78BDB06D8A4.jpg"
      },
      "part_num": "MF-RES-0603-10K",
      "part_num_suggest": {
        "input": [
          "MF-RES-0603-10K"
        ]
      },
      "pricing": {
        "component": {
          "highest": {
            "price_break": 1,
            "unit_price": 0.0609756097560976
          },
          "lowest": {
            "price_break": 1000,
            "unit_price": 0.00365853658536585
          },
          "price_breaks": {
            "preferred": {
              "1": 0.0609756097560976,
              "10": 0.00975609756097561,
              "100": 0.00731707317073171,
              "1000": 0.00365853658536585,
              "250": 0.00487804878048781
            },
            "standard": {}
          },
          "using": {
            "production": {
              "overage": 0,
              "preferred": true,
              "price_break": 1,
              "unit_price": 0.0609756097560976
            },
            "prototype": {
              "overage": 0,
              "preferred": true,
              "price_break": 1,
              "unit_price": 0.0609756097560976
            }
          }
        },
        "labor": {
          "mx.tij.2": {
            "production": {
              "total_labor": 0.0028,
              "unit_labor": 0.0028
            }
          },
          "us.tx.hou.1": {
            "production": {
              "total_labor": 0.032,
              "unit_labor": 0.032
            },
            "prototype": {
              "total_labor": 0,
              "unit_labor": 0
            }
          },
          "us.tx.hou.2": {
            "production": {
              "total_labor": 0.0523076923076923,
              "unit_labor": 0.0523076923076923
            }
          }
        }
      },
      "quantity": 1
    }
  }
}

Find and List Parts

get

Search for Parts

You can search for available parts to be used, using a fulltext search string.


URI Parameters

  • search_term: required (string)

HTTP status code 200

Body

Type: application/json

Example:

{
  "parts": [
    {
      "attributes": [],
        "availability": {
          "preferred": {
            "lead_time": null,
            "moq": 1,
            "stock": 1000000000
          },
          "standard": {
            "lead_time": null,
            "moq": null,
            "stock": 0
          }
        },
        "class": "resistor",
        "datasheets": [
          "https://s3.amazonaws.com/devpublic1/datasheets/Panasonic_TF_Resistors.pdf"
        ],
        "description": "Resistor Thick Film 0603 10K Ohm 5% 100mW 75V",
        "footprints": [
          {
            "cad_library": "R0402.png",
            "cad_library_name": "R0402",
            "cad_library_uri": "https://s3.amazonaws.com/devpublic1/libraries/Eagle/R0402.png",
            "cad_program": "Eagle"
          }
        ],
        "form_factor": {
          "pins": "2",
          "type": "SMD"
        },
        "house": true,
        "images": {
          "thumbnail": "https://s3.amazonaws.com/devpublic1/thumbnails/99D4874C-32FA-11E4-8499-A78BDB06D8A4.jpg"
        },
        "part_num": "MF-RES-0603-10K",
        "part_num_suggest": {
          "input": [
            "MF-RES-0603-10K"
          ]
        },
        "pricing": {
          "component": {
            "highest": {
              "price_break": 1,
              "unit_price": 0.0609756097560976
            },
            "lowest": {
              "price_break": 1000,
              "unit_price": 0.00365853658536585
            },
            "price_breaks": {
              "preferred": {
                "1": 0.0609756097560976,
                "10": 0.00975609756097561,
                "100": 0.00731707317073171,
                "1000": 0.00365853658536585,
                "250": 0.00487804878048781
              },
              "standard": {}
            },
            "using": {
              "production": {
                "overage": 0,
                "preferred": true,
                "price_break": 1,
                "unit_price": 0.0609756097560976
              },
              "prototype": {
                "overage": 0,
                "preferred": true,
                "price_break": 1,
                "unit_price": 0.0609756097560976
              }
            }
          },
          "labor": {
            "mx.tij.2": {
              "production": {
                "total_labor": 0.0028,
                "unit_labor": 0.0028
              }
            },
            "us.tx.hou.1": {
              "production": {
                "total_labor": 0.032,
                "unit_labor": 0.032
              },
              "prototype": {
                "total_labor": 0,
                "unit_labor": 0
              }
            },
            "us.tx.hou.2": {
              "production": {
                "total_labor": 0.0523076923076923,
                "unit_labor": 0.0523076923076923
              }
            }
          }
        },
        "quantity": 1
      }
    }
  ]
}

List all Products

get

List all Products


Body

Type: text/plain

HTTP status code 200

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "products": {
      "type": "array",
      "minItems": 0,
      "items": [
        {
          "product_id": { "type": "string"},
          "user_id": { "type": "string"},
          "name": { "type": "string"},
          "summary": { "type": "string"},
          "description": { "type": "string"},
          "sku": { "type": "string"},
          "price": { "type": "string"},
          "sale_price": { "type": "string"},
          "tariff_code": { "type": "string"},
          "weight": { "type": "string"},
          "length": { "type": "string"},
          "width": { "type": "string"},
          "height": { "type": "string"},
          "pcb_id": { "type": "string"},
          "pcb_version": { "type": "string"},
          "created": { "type": "string"}
        }
      ]
    }
  }
}

Manage Products

post

Create a new Product

Basic information about the product must be included in the request:

  • name

    The name of the product, up to 256 characters.

  • sku

    A unique SKU for the product. The SKU will act as the identifier for the product when including this product in other products, or when fulfilling shipping requests.

  • price

    The unit cost of the product in USD.

  • weight

    The weight of the product in ounces.

  • length

  • width
  • height

    The dimensions of the product in inches.

After the product is created, the contents of the product can be defined through further API calls. If the product is a PCB, the PCB and version can be linked to the product using the /v2/product/:product/pcb/:pcb/:version endpoint. If the product should contain other items from inventory, including other products, the BoM can be specified using the /v2/product/:product/bom endpoints.


Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "product": {
      "type": "object",
      "properties": {
        "name": {
          "description": "The short name of the product",
          "type": "string"
        },
        "summary": {
          "description": "A short summary of the product (optional)",
          "type": "string"
        },
        "description": {
          "description": "A long description of the product (optional)",
          "type": "string"
        },
        "sku": {
          "description": "The unique SKU for the product",
          "type": "string"
        },
        "price": {
          "description": "Product cost",
          "type": "string"
        },
        "weight": {
          "description": "Product weight",
          "type": "string"
        },
        "length": {
          "description": "Product length",
          "type": "string"
        },
        "width": {
          "description": "Product width",
          "type": "string"
        },
        "height": {
          "description": "Product height",
          "type": "string"
        }
      }
    }
  }
}

HTTP status code 200

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "product": {
      "type": "object",
      "properties": {
        "product_id": {
          "description": "A unique identifier for the product",
          "type": "string"
        },
        "user_id": {
          "description": "The ID of the user that created the product",
          "type": "string"
        },
        "name": {
          "description": "The short name of the product",
          "type": "string"
        },
        "summary": {
          "description": "A short summary of the product (optional)",
          "type": "string"
        },
        "description": {
          "description": "A long description of the product (optional)",
          "type": "string"
        },
        "sku": {
          "description": "The unique SKU for the product",
          "type": "string"
        },
        "price": {
          "description": "Insured value of the product",
          "type": "string"
        },
        "sale_price": {
          "description": "Sale price of the product",
          "type": "string"
        },
        "tariff_code": {
          "description": "Harmonized tariff code",
          "type": "string"
        },
        "weight": {
          "description": "Product weight",
          "type": "string"
        },
        "length": {
          "description": "Product length",
          "type": "string"
        },
        "width": {
          "description": "Product width",
          "type": "string"
        },
        "height": {
          "description": "Product height",
          "type": "string"
        },
        "pcb_id": {
          "description": "Unique identifier of the PCB linked to the product (optional)",
          "type": "string"
        },
        "pcb_version": {
          "description": "Version of the PCB linked to the product (optional)",
          "type": "string"
        },
        "created": {
          "description": "The date the product was created",
          "type": "string"
        }
      }
    }
  }
}

HTTP status code 409


get

Get details about a specific Product


URI Parameters

  • product_id: required (string)

HTTP status code 200

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "product": {
      "type": "object",
      "properties": {
        "product_id": {
          "description": "A unique identifier for the product",
          "type": "string"
        },
        "user_id": {
          "description": "The ID of the user that created the product",
          "type": "string"
        },
        "name": {
          "description": "The short name of the product",
          "type": "string"
        },
        "summary": {
          "description": "A short summary of the product (optional)",
          "type": "string"
        },
        "description": {
          "description": "A long description of the product (optional)",
          "type": "string"
        },
        "sku": {
          "description": "The unique SKU for the product",
          "type": "string"
        },
        "price": {
          "description": "Insured value of the product",
          "type": "string"
        },
        "sale_price": {
          "description": "Sale price of the product",
          "type": "string"
        },
        "tariff_code": {
          "description": "Harmonized tariff code",
          "type": "string"
        },
        "weight": {
          "description": "Product weight",
          "type": "string"
        },
        "length": {
          "description": "Product length",
          "type": "string"
        },
        "width": {
          "description": "Product width",
          "type": "string"
        },
        "height": {
          "description": "Product height",
          "type": "string"
        },
        "pcb_id": {
          "description": "Unique identifier of the PCB linked to the product (optional)",
          "type": "string"
        },
        "pcb_version": {
          "description": "Version of the PCB linked to the product (optional)",
          "type": "string"
        },
        "created": {
          "description": "The date the product was created",
          "type": "string"
        }
      }
    }
  }
}

HTTP status code 404


put

Update Product Details


URI Parameters

  • product_id: required (string)

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "product": {
      "type": "object",
      "properties": {
        "name": {
          "description": "The short name of the product",
          "type": "string"
        },
        "summary": {
          "description": "A short summary of the product (optional)",
          "type": "string"
        },
        "description": {
          "description": "A long description of the product (optional)",
          "type": "string"
        },
        "sku": {
          "description": "The unique SKU for the product",
          "type": "string"
        },
        "price": {
          "description": "Product cost",
          "type": "string"
        },
        "weight": {
          "description": "Product weight",
          "type": "string"
        },
        "length": {
          "description": "Product length",
          "type": "string"
        },
        "width": {
          "description": "Product width",
          "type": "string"
        },
        "height": {
          "description": "Product height",
          "type": "string"
        }
      }
    }
  }
}

HTTP status code 200

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "product": {
      "type": "object",
      "properties": {
        "product_id": {
          "description": "A unique identifier for the product",
          "type": "string"
        },
        "user_id": {
          "description": "The ID of the user that created the product",
          "type": "string"
        },
        "name": {
          "description": "The short name of the product",
          "type": "string"
        },
        "summary": {
          "description": "A short summary of the product (optional)",
          "type": "string"
        },
        "description": {
          "description": "A long description of the product (optional)",
          "type": "string"
        },
        "sku": {
          "description": "The unique SKU for the product",
          "type": "string"
        },
        "price": {
          "description": "Insured value of the product",
          "type": "string"
        },
        "sale_price": {
          "description": "Sale price of the product",
          "type": "string"
        },
        "tariff_code": {
          "description": "Harmonized tariff code",
          "type": "string"
        },
        "weight": {
          "description": "Product weight",
          "type": "string"
        },
        "length": {
          "description": "Product length",
          "type": "string"
        },
        "width": {
          "description": "Product width",
          "type": "string"
        },
        "height": {
          "description": "Product height",
          "type": "string"
        },
        "pcb_id": {
          "description": "Unique identifier of the PCB linked to the product (optional)",
          "type": "string"
        },
        "pcb_version": {
          "description": "Version of the PCB linked to the product (optional)",
          "type": "string"
        },
        "created": {
          "description": "The date the product was created",
          "type": "string"
        }
      }
    }
  }
}

HTTP status code 404


delete

Delete a Product


URI Parameters

  • product_id: required (string)

Body

Type: text/plain

HTTP status code 204


get

View the BoM for a product


URI Parameters

  • product_id: required (string)

HTTP status code 200

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "product_bom": {
      "type": "array",
      "minItems": 0,
      "items": [
        {
          "product_bom_id": { "type": "string"},
          "part_num": { "type": "string"},
          "description": { "type": "string"},
          "count": { "type": "string"}
        }
      ]
    }
  }
}

HTTP status code 404


post

Add an inventory item to the product BoM


URI Parameters

  • product_id: required (string)

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "product_bom_entry": {
      "type": "object",
      "properties": {
        "inventory_item_id": {
          "description": "The inventory item ID to add to the product BoM",
          "type": "string"
        },
        "count": {
          "description": "The number of units of this inventory item to add to the product",
          "type": "string"
        }
      }
    }
  }
}

HTTP status code 200

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "product_bom": {
      "type": "object",
      "properties": {
        "product_bom_id": {
          "description": "A unique identifier for the product BoM entry",
          "type": "string"
        },
        "part_num": {
          "description": "The part number for the BoM entry",
          "type": "string"
        },
        "description": {
          "description": "A short description of the BoM entry",
          "type": "string"
        },
        "count": {
          "description": "The number of units of this part included in the product",
          "type": "string"
        }
      }
    }
  }
}

get

Get a product BoM entry


URI Parameters

  • product_id: required (string)
  • product_bom_id: required (string)

HTTP status code 200

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "product_bom": {
      "type": "object",
      "properties": {
        "product_bom_id": {
          "description": "A unique identifier for the product BoM entry",
          "type": "string"
        },
        "part_num": {
          "description": "The part number for the BoM entry",
          "type": "string"
        },
        "description": {
          "description": "A short description of the BoM entry",
          "type": "string"
        },
        "count": {
          "description": "The number of units of this part included in the product",
          "type": "string"
        }
      }
    }
  }
}

put

Update a product BoM entry


URI Parameters

  • product_id: required (string)
  • product_bom_id: required (string)

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "product_bom_entry": {
      "type": "object",
      "properties": {
        "count": {
          "description": "The number of units of this inventory item to add to the product",
          "type": "string"
        }
      }
    }
  }
}

HTTP status code 200

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "product_bom": {
      "type": "object",
      "properties": {
        "product_bom_id": {
          "description": "A unique identifier for the product BoM entry",
          "type": "string"
        },
        "part_num": {
          "description": "The part number for the BoM entry",
          "type": "string"
        },
        "description": {
          "description": "A short description of the BoM entry",
          "type": "string"
        },
        "count": {
          "description": "The number of units of this part included in the product",
          "type": "string"
        }
      }
    }
  }
}

delete

Delete a product BoM entry


URI Parameters

  • product_id: required (string)
  • product_bom_id: required (string)

HTTP status code 204


put

Link a PCB project to the product


URI Parameters

  • product_id: required (string)
  • pcb_id: required (string)
  • pcb_version: required (string)

HTTP status code 200

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "product": {
      "type": "object",
      "properties": {
        "product_id": {
          "description": "A unique identifier for the product",
          "type": "string"
        },
        "user_id": {
          "description": "The ID of the user that created the product",
          "type": "string"
        },
        "name": {
          "description": "The short name of the product",
          "type": "string"
        },
        "summary": {
          "description": "A short summary of the product (optional)",
          "type": "string"
        },
        "description": {
          "description": "A long description of the product (optional)",
          "type": "string"
        },
        "sku": {
          "description": "The unique SKU for the product",
          "type": "string"
        },
        "price": {
          "description": "Insured value of the product",
          "type": "string"
        },
        "sale_price": {
          "description": "Sale price of the product",
          "type": "string"
        },
        "tariff_code": {
          "description": "Harmonized tariff code",
          "type": "string"
        },
        "weight": {
          "description": "Product weight",
          "type": "string"
        },
        "length": {
          "description": "Product length",
          "type": "string"
        },
        "width": {
          "description": "Product width",
          "type": "string"
        },
        "height": {
          "description": "Product height",
          "type": "string"
        },
        "pcb_id": {
          "description": "Unique identifier of the PCB linked to the product (optional)",
          "type": "string"
        },
        "pcb_version": {
          "description": "Version of the PCB linked to the product (optional)",
          "type": "string"
        },
        "created": {
          "description": "The date the product was created",
          "type": "string"
        }
      }
    }
  }
}

Manage Inventory Items

get

List Inventory Items


Body

Type: text/plain

HTTP status code 200

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "count": {
      "type": "string"
    },
    "items": {
      "type": "array",
      "minItems": 0,
      "items": [
        {
          "item_id": { "type": "string" },
          "part_num": { "type": "string" },
          "internal_part_num": { "type": "string" },
          "description": { "type": "string" },
          "length": { "type": "string" },
          "width": { "type": "string" },
          "height": { "type": "string" },
          "total_count": { "type": "string" },
          "total_value": { "type": "string" },
          "items": {
            "type": "array",
            "minItems": 0,
            "items": [
              {
                "type": { "type": "string" },
                "unit_value": { "type": "string" },
                "reserve_count": { "type": "string" },
                "created": { "type": "string" },
                "modified": { "type": "string" }
              }
            ]
          },
          "created": { "type": "string" }
        }
      ]
    }
  }
}

post

Add a new Inventory Item


Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "item": {
      "type": "object",
      "properties": {
          "part_num": { "type": "string" },
          "internal_part_num": { "type": "string" },
          "description": { "type": "string" },
          "length": { "type": "string" },
          "width": { "type": "string" },
          "height": { "type": "string" }
        }
    }
  }
}

HTTP status code 200

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "item": {
      "type": "object",
      "minItems": 0,
      "properties": {
          "item_id": { "type": "string" },
          "part_num": { "type": "string" },
          "internal_part_num": { "type": "string" },
          "description": { "type": "string" },
          "length": { "type": "string" },
          "width": { "type": "string" },
          "height": { "type": "string" },
          "total_count": { "type": "string" },
          "total_value": { "type": "string" },
          "items": {
            "type": "array",
            "minItems": 0,
            "items": [
              {
                "type": { "type": "string" },
                "unit_value": { "type": "string" },
                "reserve_count": { "type": "string" },
                "created": { "type": "string" },
                "modified": { "type": "string" }
              }
            ]
          },
          "created": { "type": "string" }
        }
    }
  }
}

get

Get an inventory item


URI Parameters

  • item_id: required (string)

HTTP status code 200

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "item": {
      "type": "object",
      "minItems": 0,
      "properties": {
          "item_id": { "type": "string" },
          "part_num": { "type": "string" },
          "internal_part_num": { "type": "string" },
          "description": { "type": "string" },
          "length": { "type": "string" },
          "width": { "type": "string" },
          "height": { "type": "string" },
          "total_count": { "type": "string" },
          "total_value": { "type": "string" },
          "items": {
            "type": "array",
            "minItems": 0,
            "items": [
              {
                "type": { "type": "string" },
                "unit_value": { "type": "string" },
                "reserve_count": { "type": "string" },
                "created": { "type": "string" },
                "modified": { "type": "string" }
              }
            ]
          },
          "created": { "type": "string" }
        }
    }
  }
}

put

Update an inventory item


URI Parameters

  • item_id: required (string)

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "item": {
      "type": "object",
      "properties": {
          "part_num": { "type": "string" },
          "internal_part_num": { "type": "string" },
          "description": { "type": "string" },
          "length": { "type": "string" },
          "width": { "type": "string" },
          "height": { "type": "string" }
        }
    }
  }
}

HTTP status code 200

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "item": {
      "type": "object",
      "minItems": 0,
      "properties": {
          "item_id": { "type": "string" },
          "part_num": { "type": "string" },
          "internal_part_num": { "type": "string" },
          "description": { "type": "string" },
          "length": { "type": "string" },
          "width": { "type": "string" },
          "height": { "type": "string" },
          "total_count": { "type": "string" },
          "total_value": { "type": "string" },
          "items": {
            "type": "array",
            "minItems": 0,
            "items": [
              {
                "type": { "type": "string" },
                "unit_value": { "type": "string" },
                "reserve_count": { "type": "string" },
                "created": { "type": "string" },
                "modified": { "type": "string" }
              }
            ]
          },
          "created": { "type": "string" }
        }
    }
  }
}

List all Advance Shipment Notifications

get

List all Advance Shipment Notifications


Body

Type: text/plain

HTTP status code 200

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "asn_requests": {
      "type": "array",
      "minItems": 0,
      "items": [
        {
          "asn_request_id": { "type": "string"},
          "organization_id": { "type": "string"},
          "user_id": { "type": "string"},
          "order_id": { "type": "string"},
          "name": { "type": "string"},
          "carrier": { "type": "string"},
          "tracking_number": { "type": "string"},
          "status": { "type": "string"},
          "created": { "type": "string"}
        }
      ]
    }
  }
}

Manage Advance Shipment Notifications

post

Create a new Advance Shipment Notification

General ASN workflow:

  1. Create an Advance Shipping Notice, providing a friendly name for the ASN. The carrier and tracking_number do not yet need to be provided, but will need to be present before the ASN can be moved to the ready state.
  2. Attach the inventory items that will be part of the shipment.
  3. Purchase a shipping label through the carrier of your choice, and ship the parts to us with the ASN ID in the Attention field on the parcel's label.
  4. Update the ASN with the carrier, tracking_number, and a status of ready.

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "asn_request": {
      "type": "object",
      "properties": [
        {
          "organization_id": {
            "description": "The organization ID that owns the shipping request",
            "type": "string"
          },
          "name": {
            "description": "A friendly name for the shipping request",
            "type": "string"
          },
          "carrier": {
            "description": "The carrier chosen for the shipment",
            "type": "string"
          },
          "tracking_number": {
            "description": "The carrier tracking number",
            "type": "string"
          }
        }
      ]
    }
  }
}

HTTP status code 200

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "asn_request": {
      "type": "object",
      "properties": [
        {
          "asn_request_id": {
            "description": "A unique ID for the shipping request",
            "type": "string"
          },
          "organization_id": {
            "description": "The organization ID that owns the shipping request",
            "type": "string"
          },
          "user_id": {
            "description": "The user who created the shipping request",
            "type": "string"
          },
          "order_id": {
            "description": "The order ID for the shipping request, once it has been ordered",
            "type": "string"
          },
          "name": {
            "description": "A friendly name for the shipping request",
            "type": "string"
          },
          "carrier": {
            "description": "The carrier chosen for the shipment",
            "type": "string"
          },
          "tracking_number": {
            "description": "The carrier tracking number",
            "type": "string"
          },
          "status": {
            "description": "The status of the shipping request: new, queued, complete",
            "type": "string"
          },
          "created": {
            "description": "",
            "type": "string"
          }
        }
      ]
    }
  }
}

get

Get details about an Advance Shipment Notification


URI Parameters

  • asn_id: required (string)

HTTP status code 200

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "asn_request": {
      "type": "object",
      "properties": [
        {
          "asn_request_id": {
            "description": "A unique ID for the shipping request",
            "type": "string"
          },
          "organization_id": {
            "description": "The organization ID that owns the shipping request",
            "type": "string"
          },
          "user_id": {
            "description": "The user who created the shipping request",
            "type": "string"
          },
          "order_id": {
            "description": "The order ID for the shipping request, once it has been ordered",
            "type": "string"
          },
          "name": {
            "description": "A friendly name for the shipping request",
            "type": "string"
          },
          "carrier": {
            "description": "The carrier chosen for the shipment",
            "type": "string"
          },
          "tracking_number": {
            "description": "The carrier tracking number",
            "type": "string"
          },
          "status": {
            "description": "The status of the shipping request: new, queued, complete",
            "type": "string"
          },
          "created": {
            "description": "",
            "type": "string"
          }
        }
      ]
    }
  }
}

put

Update an Advance Shipment Notification


URI Parameters

  • asn_id: required (string)

HTTP status code 200

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "asn_request": {
      "type": "object",
      "properties": [
        {
          "asn_request_id": {
            "description": "A unique ID for the shipping request",
            "type": "string"
          },
          "organization_id": {
            "description": "The organization ID that owns the shipping request",
            "type": "string"
          },
          "user_id": {
            "description": "The user who created the shipping request",
            "type": "string"
          },
          "order_id": {
            "description": "The order ID for the shipping request, once it has been ordered",
            "type": "string"
          },
          "name": {
            "description": "A friendly name for the shipping request",
            "type": "string"
          },
          "carrier": {
            "description": "The carrier chosen for the shipment",
            "type": "string"
          },
          "tracking_number": {
            "description": "The carrier tracking number",
            "type": "string"
          },
          "status": {
            "description": "The status of the shipping request: new, queued, complete",
            "type": "string"
          },
          "created": {
            "description": "",
            "type": "string"
          }
        }
      ]
    }
  }
}

get

Get list of Inventory Items in an Advance Shipment Notification


URI Parameters

  • asn_id: required (string)

HTTP status code 200

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "asn_request_parts": {
      "type": "array",
      "minItems": 0,
      "items": [
        {
          "asn_part_id": { "type": "string"},
          "part_num": { "type": "string"},
          "unit_value": { "type": "string"},
          "unit_count": { "type": "string"}
        }
      ]
    }
  }
}

post

Add an Inventory Item to an Advance Shipment Notification


URI Parameters

  • asn_id: required (string)

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "asn_request_part": {
      "type": "object",
      "properties": {
        "part_num": {
          "description": "The part number to be included in the shipment",
          "type": "string"
        },
        "unit_count": {
          "description": "The count of the inventory items included in the shipment",
          "type": "string"
        }
      }
    }
  }
}

HTTP status code 200

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "asn_request_parts": {
      "type": "array",
      "minItems": 0,
      "items": [
        {
          "asn_part_id": { "type": "string"},
          "part_num": { "type": "string"},
          "unit_value": { "type": "string"},
          "unit_count": { "type": "string"}
        }
      ]
    }
  }
}

delete

Remove a part from an Advance Shipment Notification


URI Parameters

  • asn_id: required (string)
  • part_id: required (string)

HTTP status code 200

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "asn_request_parts": {
      "type": "array",
      "minItems": 0,
      "items": [
        {
          "asn_part_id": { "type": "string"},
          "part_num": { "type": "string"},
          "unit_value": { "type": "string"},
          "unit_count": { "type": "string"}
        }
      ]
    }
  }
}

List all Fulfillment Requests

get

List all fulfillment requests


Body

Type: text/plain

HTTP status code 200

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "fulfillment_request": {
      "type": "object",
      "properties": [
        {
          "fulfillment_request_id": {
            "description": "A unique ID for the fulfillment request",
            "type": "string"
          },
          "user_id": {
            "description": "The user who created the fulfillment request",
            "type": "string"
          },
          "customer_name": {
            "description": "Fulfillment recipient: customer name",
            "type": "string"
          },
          "company": {
            "description": "Fulfillment recipient: company name",
            "type": "string"
          },
          "phone_number": {
            "description": "Fulfillment recipient: phone number",
            "type": "string"
          },
          "email": {
            "description": "Fulfillment recipient: email address",
            "type": "string"
          },
          "po_number": {
            "description": "Fulfillment recipient: purchase order number",
            "type": "string"
          },
          "address1": {
            "description": "Fulfillment recipient: street address (line 1)",
            "type": "string"
          },
          "address2": {
            "description": "Fulfillment recipient: street address (line 2)",
            "type": "string"
          },
          "city": {
            "description": "Fulfillment recipient: city",
            "type": "string"
          },
          "state": {
            "description": "Fulfillment recipient: state or province",
            "type": "string"
          },
          "zip_code": {
            "description": "Fulfillment recipient: ZIP or postal code",
            "type": "string"
          },
          "country": {
            "description": "Fulfillment recipient: two-letter country code",
            "type": "string"
          },
          "verified": {
            "description": "Boolean flag that indicates whether address has been successfully validated",
            "type": "string"
          },
          "products": {
            "description": "List of products to be included in the shipment",
            "type": "array",
            "items": [
              {
                "fulfillment_product_id": { "type": "string"},
                "product_id": { "type": "string"},
                "sku": { "type": "string"},
                "length": { "type": "string"},
                "height": { "type": "string"},
                "width": { "type": "string"},
                "weight": { "type": "string"},
                "units_requested": { "type": "string"}
              }
            ]
          },
          "carrier": {
            "description": "The carrier used for shipping this request",
            "type": "string"
          },
          "service": {
            "description": "The service used for shipping this request",
            "type": "string"
          },
          "tracking": {
            "description": "The tracking number for the shipment",
            "type": "string"
          },
          "created": {
            "description": "The date the fulfillment request was created",
            "type": "string"
          }
        }
      ]
    }
  }
}

Manage Fulfillment Requests

post

Create a new Fulfillment Request

General product fulfillment workflow:

  1. Create a fulfillment request with the shipping address of the recipient. The address will be verified by the service, returning 200 if successful, or 400 if the address could not be validated.
  2. Add one or more products to the fulfillment request.
  3. Get a shipping quote to see the various shipping options.
  4. Create a fulfillment order, providing one or more fulfillment request IDs and their preferred shipping options.

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "fulfillment_request": {
      "type": "array",
      "minItems": 0,
      "items": [
        {
          "customer_name": { "type": "string"},
          "company": { "type": "string"},
          "phone_number": { "type": "string"},
          "email": { "type": "string"},
          "po_number": { "type": "string"},
          "address1": { "type": "string"},
          "address2": { "type": "string"},
          "city": { "type": "string"},
          "state": { "type": "string"},
          "zip_code": { "type": "string"},
          "country": { "type": "string"},
          "status": { "type": "string"}
        }
      ]
    }
  }
}

HTTP status code 200

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "fulfillment_request": {
      "type": "object",
      "properties": [
        {
          "fulfillment_request_id": {
            "description": "A unique ID for the fulfillment request",
            "type": "string"
          },
          "user_id": {
            "description": "The user who created the fulfillment request",
            "type": "string"
          },
          "customer_name": {
            "description": "Fulfillment recipient: customer name",
            "type": "string"
          },
          "company": {
            "description": "Fulfillment recipient: company name",
            "type": "string"
          },
          "phone_number": {
            "description": "Fulfillment recipient: phone number",
            "type": "string"
          },
          "email": {
            "description": "Fulfillment recipient: email address",
            "type": "string"
          },
          "po_number": {
            "description": "Fulfillment recipient: purchase order number",
            "type": "string"
          },
          "address1": {
            "description": "Fulfillment recipient: street address (line 1)",
            "type": "string"
          },
          "address2": {
            "description": "Fulfillment recipient: street address (line 2)",
            "type": "string"
          },
          "city": {
            "description": "Fulfillment recipient: city",
            "type": "string"
          },
          "state": {
            "description": "Fulfillment recipient: state or province",
            "type": "string"
          },
          "zip_code": {
            "description": "Fulfillment recipient: ZIP or postal code",
            "type": "string"
          },
          "country": {
            "description": "Fulfillment recipient: two-letter country code",
            "type": "string"
          },
          "verified": {
            "description": "Boolean flag that indicates whether address has been successfully validated",
            "type": "string"
          },
          "products": {
            "description": "List of products to be included in the shipment",
            "type": "array",
            "items": [
              {
                "fulfillment_product_id": { "type": "string"},
                "product_id": { "type": "string"},
                "sku": { "type": "string"},
                "length": { "type": "string"},
                "height": { "type": "string"},
                "width": { "type": "string"},
                "weight": { "type": "string"},
                "units_requested": { "type": "string"}
              }
            ]
          },
          "carrier": {
            "description": "The carrier used for shipping this request",
            "type": "string"
          },
          "service": {
            "description": "The service used for shipping this request",
            "type": "string"
          },
          "tracking": {
            "description": "The tracking number for the shipment",
            "type": "string"
          },
          "created": {
            "description": "The date the fulfillment request was created",
            "type": "string"
          }
        }
      ]
    }
  }
}

HTTP status code 400


get

Get details about a Fulfillment Request


URI Parameters

  • request_id: required (string)

HTTP status code 200

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "fulfillment_request": {
      "type": "object",
      "properties": [
        {
          "fulfillment_request_id": {
            "description": "A unique ID for the fulfillment request",
            "type": "string"
          },
          "user_id": {
            "description": "The user who created the fulfillment request",
            "type": "string"
          },
          "customer_name": {
            "description": "Fulfillment recipient: customer name",
            "type": "string"
          },
          "company": {
            "description": "Fulfillment recipient: company name",
            "type": "string"
          },
          "phone_number": {
            "description": "Fulfillment recipient: phone number",
            "type": "string"
          },
          "email": {
            "description": "Fulfillment recipient: email address",
            "type": "string"
          },
          "po_number": {
            "description": "Fulfillment recipient: purchase order number",
            "type": "string"
          },
          "address1": {
            "description": "Fulfillment recipient: street address (line 1)",
            "type": "string"
          },
          "address2": {
            "description": "Fulfillment recipient: street address (line 2)",
            "type": "string"
          },
          "city": {
            "description": "Fulfillment recipient: city",
            "type": "string"
          },
          "state": {
            "description": "Fulfillment recipient: state or province",
            "type": "string"
          },
          "zip_code": {
            "description": "Fulfillment recipient: ZIP or postal code",
            "type": "string"
          },
          "country": {
            "description": "Fulfillment recipient: two-letter country code",
            "type": "string"
          },
          "verified": {
            "description": "Boolean flag that indicates whether address has been successfully validated",
            "type": "string"
          },
          "products": {
            "description": "List of products to be included in the shipment",
            "type": "array",
            "items": [
              {
                "fulfillment_product_id": { "type": "string"},
                "product_id": { "type": "string"},
                "sku": { "type": "string"},
                "length": { "type": "string"},
                "height": { "type": "string"},
                "width": { "type": "string"},
                "weight": { "type": "string"},
                "units_requested": { "type": "string"}
              }
            ]
          },
          "carrier": {
            "description": "The carrier used for shipping this request",
            "type": "string"
          },
          "service": {
            "description": "The service used for shipping this request",
            "type": "string"
          },
          "tracking": {
            "description": "The tracking number for the shipment",
            "type": "string"
          },
          "created": {
            "description": "The date the fulfillment request was created",
            "type": "string"
          }
        }
      ]
    }
  }
}

put

Update details for a Fulfillment Request


URI Parameters

  • request_id: required (string)

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "fulfillment_request": {
      "type": "array",
      "minItems": 0,
      "items": [
        {
          "customer_name": { "type": "string"},
          "company": { "type": "string"},
          "phone_number": { "type": "string"},
          "email": { "type": "string"},
          "po_number": { "type": "string"},
          "address1": { "type": "string"},
          "address2": { "type": "string"},
          "city": { "type": "string"},
          "state": { "type": "string"},
          "zip_code": { "type": "string"},
          "country": { "type": "string"},
          "status": { "type": "string"}
        }
      ]
    }
  }
}

HTTP status code 200

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "fulfillment_request": {
      "type": "object",
      "properties": [
        {
          "fulfillment_request_id": {
            "description": "A unique ID for the fulfillment request",
            "type": "string"
          },
          "user_id": {
            "description": "The user who created the fulfillment request",
            "type": "string"
          },
          "customer_name": {
            "description": "Fulfillment recipient: customer name",
            "type": "string"
          },
          "company": {
            "description": "Fulfillment recipient: company name",
            "type": "string"
          },
          "phone_number": {
            "description": "Fulfillment recipient: phone number",
            "type": "string"
          },
          "email": {
            "description": "Fulfillment recipient: email address",
            "type": "string"
          },
          "po_number": {
            "description": "Fulfillment recipient: purchase order number",
            "type": "string"
          },
          "address1": {
            "description": "Fulfillment recipient: street address (line 1)",
            "type": "string"
          },
          "address2": {
            "description": "Fulfillment recipient: street address (line 2)",
            "type": "string"
          },
          "city": {
            "description": "Fulfillment recipient: city",
            "type": "string"
          },
          "state": {
            "description": "Fulfillment recipient: state or province",
            "type": "string"
          },
          "zip_code": {
            "description": "Fulfillment recipient: ZIP or postal code",
            "type": "string"
          },
          "country": {
            "description": "Fulfillment recipient: two-letter country code",
            "type": "string"
          },
          "verified": {
            "description": "Boolean flag that indicates whether address has been successfully validated",
            "type": "string"
          },
          "products": {
            "description": "List of products to be included in the shipment",
            "type": "array",
            "items": [
              {
                "fulfillment_product_id": { "type": "string"},
                "product_id": { "type": "string"},
                "sku": { "type": "string"},
                "length": { "type": "string"},
                "height": { "type": "string"},
                "width": { "type": "string"},
                "weight": { "type": "string"},
                "units_requested": { "type": "string"}
              }
            ]
          },
          "carrier": {
            "description": "The carrier used for shipping this request",
            "type": "string"
          },
          "service": {
            "description": "The service used for shipping this request",
            "type": "string"
          },
          "tracking": {
            "description": "The tracking number for the shipment",
            "type": "string"
          },
          "created": {
            "description": "The date the fulfillment request was created",
            "type": "string"
          }
        }
      ]
    }
  }
}

delete

Delete this Fulfillment Request


URI Parameters

  • request_id: required (string)

put

Verify the recipient address for the Fulfillment Request


URI Parameters

  • request_id: required (string)

HTTP status code 200

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "fulfillment_request": {
      "type": "object",
      "properties": [
        {
          "fulfillment_request_id": {
            "description": "A unique ID for the fulfillment request",
            "type": "string"
          },
          "user_id": {
            "description": "The user who created the fulfillment request",
            "type": "string"
          },
          "customer_name": {
            "description": "Fulfillment recipient: customer name",
            "type": "string"
          },
          "company": {
            "description": "Fulfillment recipient: company name",
            "type": "string"
          },
          "phone_number": {
            "description": "Fulfillment recipient: phone number",
            "type": "string"
          },
          "email": {
            "description": "Fulfillment recipient: email address",
            "type": "string"
          },
          "po_number": {
            "description": "Fulfillment recipient: purchase order number",
            "type": "string"
          },
          "address1": {
            "description": "Fulfillment recipient: street address (line 1)",
            "type": "string"
          },
          "address2": {
            "description": "Fulfillment recipient: street address (line 2)",
            "type": "string"
          },
          "city": {
            "description": "Fulfillment recipient: city",
            "type": "string"
          },
          "state": {
            "description": "Fulfillment recipient: state or province",
            "type": "string"
          },
          "zip_code": {
            "description": "Fulfillment recipient: ZIP or postal code",
            "type": "string"
          },
          "country": {
            "description": "Fulfillment recipient: two-letter country code",
            "type": "string"
          },
          "verified": {
            "description": "Boolean flag that indicates whether address has been successfully validated",
            "type": "string"
          },
          "products": {
            "description": "List of products to be included in the shipment",
            "type": "array",
            "items": [
              {
                "fulfillment_product_id": { "type": "string"},
                "product_id": { "type": "string"},
                "sku": { "type": "string"},
                "length": { "type": "string"},
                "height": { "type": "string"},
                "width": { "type": "string"},
                "weight": { "type": "string"},
                "units_requested": { "type": "string"}
              }
            ]
          },
          "carrier": {
            "description": "The carrier used for shipping this request",
            "type": "string"
          },
          "service": {
            "description": "The service used for shipping this request",
            "type": "string"
          },
          "tracking": {
            "description": "The tracking number for the shipment",
            "type": "string"
          },
          "created": {
            "description": "The date the fulfillment request was created",
            "type": "string"
          }
        }
      ]
    }
  }
}

HTTP status code 400


post

Add a Product to this Fulfillment Request


URI Parameters

  • request_id: required (string)

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "fulfillment_product": {
      "type": "object",
      "properties": {
        "product_id": {
          "description": "The ID of the product to be included in the shipment",
          "type": "string"
        },
        "count": {
          "description": "The number of this product to include in the shipment",
          "type": "string"
        }
      }
    }
  }
}

HTTP status code 200

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "fulfillment_request": {
      "type": "object",
      "properties": [
        {
          "fulfillment_request_id": {
            "description": "A unique ID for the fulfillment request",
            "type": "string"
          },
          "user_id": {
            "description": "The user who created the fulfillment request",
            "type": "string"
          },
          "customer_name": {
            "description": "Fulfillment recipient: customer name",
            "type": "string"
          },
          "company": {
            "description": "Fulfillment recipient: company name",
            "type": "string"
          },
          "phone_number": {
            "description": "Fulfillment recipient: phone number",
            "type": "string"
          },
          "email": {
            "description": "Fulfillment recipient: email address",
            "type": "string"
          },
          "po_number": {
            "description": "Fulfillment recipient: purchase order number",
            "type": "string"
          },
          "address1": {
            "description": "Fulfillment recipient: street address (line 1)",
            "type": "string"
          },
          "address2": {
            "description": "Fulfillment recipient: street address (line 2)",
            "type": "string"
          },
          "city": {
            "description": "Fulfillment recipient: city",
            "type": "string"
          },
          "state": {
            "description": "Fulfillment recipient: state or province",
            "type": "string"
          },
          "zip_code": {
            "description": "Fulfillment recipient: ZIP or postal code",
            "type": "string"
          },
          "country": {
            "description": "Fulfillment recipient: two-letter country code",
            "type": "string"
          },
          "verified": {
            "description": "Boolean flag that indicates whether address has been successfully validated",
            "type": "string"
          },
          "products": {
            "description": "List of products to be included in the shipment",
            "type": "array",
            "items": [
              {
                "fulfillment_product_id": { "type": "string"},
                "product_id": { "type": "string"},
                "sku": { "type": "string"},
                "length": { "type": "string"},
                "height": { "type": "string"},
                "width": { "type": "string"},
                "weight": { "type": "string"},
                "units_requested": { "type": "string"}
              }
            ]
          },
          "carrier": {
            "description": "The carrier used for shipping this request",
            "type": "string"
          },
          "service": {
            "description": "The service used for shipping this request",
            "type": "string"
          },
          "tracking": {
            "description": "The tracking number for the shipment",
            "type": "string"
          },
          "created": {
            "description": "The date the fulfillment request was created",
            "type": "string"
          }
        }
      ]
    }
  }
}

delete

Remove this Product from this Request


URI Parameters

  • request_id: required (string)
  • product_id: required (string)

HTTP status code 200

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "fulfillment_request": {
      "type": "object",
      "properties": [
        {
          "fulfillment_request_id": {
            "description": "A unique ID for the fulfillment request",
            "type": "string"
          },
          "user_id": {
            "description": "The user who created the fulfillment request",
            "type": "string"
          },
          "customer_name": {
            "description": "Fulfillment recipient: customer name",
            "type": "string"
          },
          "company": {
            "description": "Fulfillment recipient: company name",
            "type": "string"
          },
          "phone_number": {
            "description": "Fulfillment recipient: phone number",
            "type": "string"
          },
          "email": {
            "description": "Fulfillment recipient: email address",
            "type": "string"
          },
          "po_number": {
            "description": "Fulfillment recipient: purchase order number",
            "type": "string"
          },
          "address1": {
            "description": "Fulfillment recipient: street address (line 1)",
            "type": "string"
          },
          "address2": {
            "description": "Fulfillment recipient: street address (line 2)",
            "type": "string"
          },
          "city": {
            "description": "Fulfillment recipient: city",
            "type": "string"
          },
          "state": {
            "description": "Fulfillment recipient: state or province",
            "type": "string"
          },
          "zip_code": {
            "description": "Fulfillment recipient: ZIP or postal code",
            "type": "string"
          },
          "country": {
            "description": "Fulfillment recipient: two-letter country code",
            "type": "string"
          },
          "verified": {
            "description": "Boolean flag that indicates whether address has been successfully validated",
            "type": "string"
          },
          "products": {
            "description": "List of products to be included in the shipment",
            "type": "array",
            "items": [
              {
                "fulfillment_product_id": { "type": "string"},
                "product_id": { "type": "string"},
                "sku": { "type": "string"},
                "length": { "type": "string"},
                "height": { "type": "string"},
                "width": { "type": "string"},
                "weight": { "type": "string"},
                "units_requested": { "type": "string"}
              }
            ]
          },
          "carrier": {
            "description": "The carrier used for shipping this request",
            "type": "string"
          },
          "service": {
            "description": "The service used for shipping this request",
            "type": "string"
          },
          "tracking": {
            "description": "The tracking number for the shipment",
            "type": "string"
          },
          "created": {
            "description": "The date the fulfillment request was created",
            "type": "string"
          }
        }
      ]
    }
  }
}

get

Get shipping quote and methods for this Request


URI Parameters

  • request_id: required (string)

HTTP status code 200

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "charges": {
      "type": "object",
      "properties": {
        "shipment": {
          "description": "The various shipping options, and associated costs, for the fulfillment order",
          "type": "array"
        },
        "labor": {
          "description": "The labor charges for the fulfillment order",
          "type": "string"
        }
      }
    }
  }
}

Retrieve List of Orders

get

Get a list of all orders


Query Parameters

  • Order Type: (string)

    Order type: pcb, fulfillment, consignment

    Example:

    pcb

HTTP status code 200

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "orders": {
      "type": "array",
      "minItems": 0,
      "items": [
        {
          "order_id": { "type": "string" },
          "user_id": { "type": "string" },
          "email": { "type": "string" },
          "expedite": { "type": "string" },
          "status": { "type": "string" },
          "invoice_total": { "type": "string" },  
          "type": { "type": "string" },
          "unit_count": { "type": "string" },
          "pcb_id": { "type": "string" },
          "name": { "type": "string" },
          "pcb_name": { "type": "string" },
          "pcb_version": { "type": "string" },
          "pcb_area": { "type": "string" },
          "created": { "type": "string" },
          "shipped" : { "type" : "string" },
          "shipment" : {
              "type" : "object",
              "minItems" : 0,
              "properties" : {
                  "actual_cost" : { "type" : "string" },
                  "carrier" : { "type" : "string" },
                  "created" : { "type" : "string" },
                  "delivered" : { "type" : "string" },
                  "flat_rate" : { "type" : "string" },
                  "label_png" : { "type" : "string" },
                  "label_zpl" : { "type" : "string" },
                  "order_id" : { "type" : "string" },
                  "quoted_cost" : { "type" : "string" },
                  "service" : { "type" : "string" },
                  "service_name" : { "type" : "string" },
                  "ship_status" : { "type" : "string" },
                  "shipped" : { "type" : "string" },
                  "signature_required" : { "type" : "string" },
                  "tracking" : { "type" : "string" }
              }
           }
        }
      ]
    }
  }
}

Manage Orders

post

Create an Order for a PCB Project

PCB order workflow:

  1. Create the order.
  2. If the shipping address was not specified upon order creation, update the order to include a shipping address.
  3. Request shipping quotes for the order.
  4. Set the shipping method for the order.
  5. Apply payments to the order using payment tokens. Any amount, up to the full order amount, can be applied in each API call. The order will not be shipped until payments totalling the full invoice amount have been applied.

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "order": {
      "type": "object",
      "properties": {
        "pcb_id": {
          "description": "The PCB ID to be ordered",
          "type": "string"
        },
        "pcb_version": {
          "description": "The PCB version to be ordered",
          "type": "string"
        },
        "quantity": {
          "description": "The number of units to order",
          "type": "string"
        },
        "shipto": {
          "description": "The ID for the receiving address for the shipment",
          "type": "object",
          "properties": {
            "name": {
              "description": "Recipient name",
              "type": "string"
            },
            "company": {
              "description": "Company name",
              "type": "string"
            },
            "street": {
              "description": "Street address (line 1)",
              "type": "string"
            },
            "street_2": {
              "description": "Street address (line 2)",
              "type": "string"
            },
            "city": {
              "description": "City",
              "type": "string"
            },
            "state": {
              "description": "State/Province",
              "type": "string"
            },
            "postcode": {
              "description": "ZIP/Postal code",
              "type": "string"
            },
            "country": {
              "description": "2-Letter country code",
              "type": "string"
            },
            "phone": {
              "description": "Phone number",
              "type": "string"
            }
          }
        }
      }
    }
  }
}

HTTP status code 200

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "order": {
      "type": "object",
      "properties": {
        "order_id": {
          "description": "A unique identifier for the order",
          "type": "string"
        },
        "user_id": {
          "description": "The user who placed the order",
          "type": "string"
        },
        "email": {
          "description": "The email address of the user who placed the order",
          "type": "string"
        },
        "expedite": {
          "description": "Expedited order (boolean)",
          "type": "string"
        },
        "status": {
          "description": "Order status (quote, paid, reviewed, processing, shipped, cancelled)",
          "type": "string"
        },
        "invoice_total": {
          "description": "Total price for the order",
          "type": "string"
        },
        "type": {
          "description": "Order type (pcb, fulfillment, consignment)",
          "type": "string"
        },
        "unit_count": {
          "description": "Number of units in the order",
          "type": "string"
        },
        "pcb_id": {
          "description": "PCB orders: The PCB ID that was ordered",
          "type": "string"
        },
        "name": {
          "description": "PCB orders: The name of the PCB project",
          "type": "string"
        },
        "pcb_version": {
          "description": "PCB Orders: The PCB version that was ordered",
          "type": "string"
        },
        "pcb_area": {
          "description": "PCB Orders: The physical area of the PCB that was ordered",
          "type": "string"
        },
        "created": {
          "description": "The date the order was created",
          "type": "string"
        },
        "shipped": {
          "description": "The date the order was shipped",
          "type": "string"
        },
        "shipto": {
          "type": "object",
          "properties": {
            "name": { "type": "string"},
            "company": { "type": "string" },
            "street": { "type": "string", "description": "Street Address"},
            "street_2": { "type": "string"},
            "city": { "type": "string"},
            "state": { "type": "string"},
            "postcode": { "type": "string"},
            "country": { "type": "string", "description": "2-Letter ISO Code for Country"},
            "phone": { "type": "string"}
          }
        }
      }
    }
  }
}

post

Create an Order for one or more Fulfillment Requests


Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "order": {
      "type": "object",
      "properties": {
        "fulfillment_requests": {
          "type": "array",
          "items": [
            {
              "fulfillment_request_id": {
                "type": "string",
                "description": "The fulfillment request ID to add to the order"
              },
              "carrier": {
                "type": "string",
                "description": "The carrier to use for the fulfillment request, obtained from the fulfillment quote"
              },
              "service": {
                "type": "string",
                "description": "The shipping service to use for the fulfillment request, obtained from the fulfillment quote"
              },
              "shipment_id": {
                "type": "string",
                "description": "The shipment ID from the fulfillment quote"
              },
              "rate_id": {
                "type": "string",
                "description": "The rate ID from the fulfillment quote"
              }
            }
          ]
        }
      }
    }
  }
}

HTTP status code 200

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "order": {
      "type": "object",
      "properties": {
        "order_id": {
          "description": "A unique identifier for the order",
          "type": "string"
        },
        "user_id": {
          "description": "The user who placed the order",
          "type": "string"
        },
        "email": {
          "description": "The email address of the user who placed the order",
          "type": "string"
        },
        "expedite": {
          "description": "Expedited order (boolean)",
          "type": "string"
        },
        "status": {
          "description": "Order status (quote, paid, reviewed, processing, shipped, cancelled)",
          "type": "string"
        },
        "invoice_total": {
          "description": "Total price for the order",
          "type": "string"
        },
        "type": {
          "description": "Order type (pcb, fulfillment, consignment)",
          "type": "string"
        },
        "unit_count": {
          "description": "Number of units in the order",
          "type": "string"
        },
        "pcb_id": {
          "description": "PCB orders: The PCB ID that was ordered",
          "type": "string"
        },
        "name": {
          "description": "PCB orders: The name of the PCB project",
          "type": "string"
        },
        "pcb_version": {
          "description": "PCB Orders: The PCB version that was ordered",
          "type": "string"
        },
        "pcb_area": {
          "description": "PCB Orders: The physical area of the PCB that was ordered",
          "type": "string"
        },
        "created": {
          "description": "The date the order was created",
          "type": "string"
        },
        "shipped": {
          "description": "The date the order was shipped",
          "type": "string"
        },
        "shipto": {
          "type": "object",
          "properties": {
            "name": { "type": "string"},
            "company": { "type": "string" },
            "street": { "type": "string", "description": "Street Address"},
            "street_2": { "type": "string"},
            "city": { "type": "string"},
            "state": { "type": "string"},
            "postcode": { "type": "string"},
            "country": { "type": "string", "description": "2-Letter ISO Code for Country"},
            "phone": { "type": "string"}
          }
        }
      }
    }
  }
}

get

Get details about a specific order


URI Parameters

  • order_id: required (string)

HTTP status code 200

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "order": {
      "type": "object",
      "properties": {
        "order_id": {
          "description": "A unique identifier for the order",
          "type": "string"
        },
        "user_id": {
          "description": "The user who placed the order",
          "type": "string"
        },
        "email": {
          "description": "The email address of the user who placed the order",
          "type": "string"
        },
        "expedite": {
          "description": "Expedited order (boolean)",
          "type": "string"
        },
        "status": {
          "description": "Order status (quote, paid, reviewed, processing, shipped, cancelled)",
          "type": "string"
        },
        "invoice_total": {
          "description": "Total price for the order",
          "type": "string"
        },
        "type": {
          "description": "Order type (pcb, fulfillment, consignment)",
          "type": "string"
        },
        "unit_count": {
          "description": "Number of units in the order",
          "type": "string"
        },
        "pcb_id": {
          "description": "PCB orders: The PCB ID that was ordered",
          "type": "string"
        },
        "name": {
          "description": "PCB orders: The name of the PCB project",
          "type": "string"
        },
        "pcb_version": {
          "description": "PCB Orders: The PCB version that was ordered",
          "type": "string"
        },
        "pcb_area": {
          "description": "PCB Orders: The physical area of the PCB that was ordered",
          "type": "string"
        },
        "created": {
          "description": "The date the order was created",
          "type": "string"
        },
        "shipped": {
          "description": "The date the order was shipped",
          "type": "string"
        },
        "shipto": {
          "type": "object",
          "properties": {
            "name": { "type": "string"},
            "company": { "type": "string" },
            "street": { "type": "string", "description": "Street Address"},
            "street_2": { "type": "string"},
            "city": { "type": "string"},
            "state": { "type": "string"},
            "postcode": { "type": "string"},
            "country": { "type": "string", "description": "2-Letter ISO Code for Country"},
            "phone": { "type": "string"}
          }
        }
      }
    }
  }
}

put

Modify details of a specific order

Using this method, you can set or update the shipping address for the order. If you did not specify the shipping address at order creation time, you must use this method to set the shipping address before paying for or requesting shipping quotes for the order.


URI Parameters

  • order_id: required (string)

Body

Type: application/json

Schema:


{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "order": {
      "type": "object",
      "properties": {
        "shipto": {
          "type": "object",
          "properties": {
            "name": { "type": "string"},
            "company": { "type": "string" },
            "street": { "type": "string", "description": "Street Address"},
            "street_2": { "type": "string"},
            "city": { "type": "string"},
            "state": { "type": "string"},
            "postcode": { "type": "string"},
            "country": { "type": "string", "description": "2-Letter ISO Code for Country"},
            "phone": { "type": "string"}
          }
        }
      }
    }
  }
}

HTTP status code 200

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "order": {
      "type": "object",
      "properties": {
        "order_id": {
          "description": "A unique identifier for the order",
          "type": "string"
        },
        "user_id": {
          "description": "The user who placed the order",
          "type": "string"
        },
        "email": {
          "description": "The email address of the user who placed the order",
          "type": "string"
        },
        "expedite": {
          "description": "Expedited order (boolean)",
          "type": "string"
        },
        "status": {
          "description": "Order status (quote, paid, reviewed, processing, shipped, cancelled)",
          "type": "string"
        },
        "invoice_total": {
          "description": "Total price for the order",
          "type": "string"
        },
        "type": {
          "description": "Order type (pcb, fulfillment, consignment)",
          "type": "string"
        },
        "unit_count": {
          "description": "Number of units in the order",
          "type": "string"
        },
        "pcb_id": {
          "description": "PCB orders: The PCB ID that was ordered",
          "type": "string"
        },
        "name": {
          "description": "PCB orders: The name of the PCB project",
          "type": "string"
        },
        "pcb_version": {
          "description": "PCB Orders: The PCB version that was ordered",
          "type": "string"
        },
        "pcb_area": {
          "description": "PCB Orders: The physical area of the PCB that was ordered",
          "type": "string"
        },
        "created": {
          "description": "The date the order was created",
          "type": "string"
        },
        "shipped": {
          "description": "The date the order was shipped",
          "type": "string"
        },
        "shipto": {
          "type": "object",
          "properties": {
            "name": { "type": "string"},
            "company": { "type": "string" },
            "street": { "type": "string", "description": "Street Address"},
            "street_2": { "type": "string"},
            "city": { "type": "string"},
            "state": { "type": "string"},
            "postcode": { "type": "string"},
            "country": { "type": "string", "description": "2-Letter ISO Code for Country"},
            "phone": { "type": "string"}
          }
        }
      }
    }
  }
}

HTTP status code 400

Body

Type: application/json

Schema:


  {

    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "properties": {
      "error": {
        "type": "object",
        "properties": {
          "code": {
            "description": "A unique error code",
            "type": "text"
          },
          "text": {
            "type": "array",
            "description": "List of error detail strings",
            "minItems": 0,
            "items": { "type": "string"}
          }
        }
      }
    }
  }

HTTP status code 404


get

Get shipping quotes for the specified PCB order


URI Parameters

  • order_id: required (string)

HTTP status code 200

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "shipping_quote": {
      "type": "array",
      "minItems": 0,
      "items": [
        {
          "carrier": {
            "description": "The shipping carrier",
            "type": "string"
          },
          "service": {
            "description": "The shipping service",
            "type": "string"
          },
          "service_name": {
            "description": "The shipping service (prettified)",
            "type": "string"
          },
          "rate": {
            "description": "The quoted shipping rate",
            "type": "string"
          }
        }
      ]
    }
  }
}

put

Set shipping method for this order


URI Parameters

  • order_id: required (string)

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "order_shipping": {
      "type": "object",
      "properties": {
        "carrier": {
          "description": "The selected shipping carrier",
          "type": "string"
        },
        "service": {
          "description": "The selected shipping service",
          "type": "string"
        },
        "service_name": {
          "description": "The prettified selected shipping service",
          "type": "string"
        }
      }
    }
  }
}

HTTP status code 200

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "order_shipping": {
      "type": "object",
      "properties": {
        "order_shipmentid": {
          "description": "A unique identifier for the order shipment",
          "type": "string"
        },
        "carrier": {
          "description": "The selected shipping carrier",
          "type": "string"
        },
        "service": {
          "description": "The selected shipping service",
          "type": "string"
        },
        "service_name": {
          "description": "The prettified selected shipping service",
          "type": "string"
        },
        "quoted_cost": {
          "description": "The quoted cost for shipping",
          "type": "string"
        }
      }
    }
  }
}

put

Apply a payment to this order

Any amount, up to the full order amount, can be applied in each call. The order will not be shipped until payments totalling the full invoice amount have been applied.


URI Parameters

  • order_id: required (string)

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "order_payment": {
      "type": "object",
      "properties": {
        "payment_token_id": {
          "description": "The payment token to use for the order",
          "type": "string"
        },
        "amount": {
          "description": "The amount to pay against the order using this payment token",
          "type": "string"
        }
      }
    }
  }
}

HTTP status code 204


post

Cancel the specified order

An order can only be canceled while it is in the 'quote' status. Once the order has been paid, the order cannot be canceled without contacting MacroFab support.


URI Parameters

  • order_id: required (string)

HTTP status code 204


List payment tokens

get

Get a list of available payment tokens


Body

Type: text/plain

HTTP status code 200

Body

Type: application/json

Schema:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "payment_tokens": {
      "type": "array",
      "minItems": 0,
      "items": [
        {
          "payment_tokenid": { "type": "string"},
          "identifier": { "type": "string"}
        }
      ]
    }
  }
}