Skip to main content
POST

Create a production order

Scope:inventory:production-orders.write
https://api.holded.com/api/v2/production-orders

Creates a new production order.

Request body

object
descriptionstringoptional
datestring<date>optional

Issue date in ISO 8601 format

due_datestring<date>optional

Due date in ISO 8601 format

contact_idstringoptional
contact_namestringoptional
supplier_idstringoptional
supplier_namestringoptional
notesstringoptional
currencystringoptional
languagestringoptional
tags[]string[]optional
source_warehouse_idstringoptional
destination_warehouse_idstringoptional
manufacturing_pipeline_idstringoptional
manufactured_productobjectrequired
product_idstringrequired
namestringrequired
skustringoptional
kindstringoptional

Product kind. Use "serialnumbers" (one word) for serial-number-tracked products.

Enum:simplelotspackvariantsserialnumbers
quantitynumberoptional
variant_ids[]object[]optional
materials[]object[]optional
namestring
descriptionstring
typestring
Enum:productserviceline
kindstring

Product kind. Required for lots and serialnumbers to enforce secondary_ids.

Enum:simplelotsvariantsserialnumberspack
product_idstring | null
unitsnumber
pricenumber
skustring
barcodestring
factory_codestring
secondary_ids[]object[]

Required when "type" is "product" (the default when omitted). Must contain exactly 1 item unless "kind" is "lots" or "serialnumbers", and the sum of "units" must equal the material's "units".

is_valuedbooleanoptional

Request

python
import requests

url = "https://api.holded.com/api/v2/production-orders"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
}

payload = {
    "description": "string",
    "date": "2024-01-15",
    "due_date": "2024-02-15",
    "contact_id": "string",
    "contact_name": "string",
    "supplier_id": "string",
    "supplier_name": "string",
    "notes": "string",
    "currency": "string",
    "language": "string",
    "tags": [
        "string"
    ],
    "source_warehouse_id": "string",
    "destination_warehouse_id": "string",
    "manufacturing_pipeline_id": "string",
    "manufactured_product": {
        "product_id": "string",
        "name": "string",
        "sku": "string",
        "kind": [
            "simple",
            "lots",
            "pack",
            "variants",
            "serialnumbers"
        ],
        "quantity": 0,
        "variant_ids": [
            {
                "id": "string",
                "units": 0
            }
        ]
    },
    "materials": [
        {
            "name": "string",
            "description": "string",
            "type": "product",
            "kind": "simple",
            "product_id": "string",
            "units": 0,
            "price": 0,
            "sku": "string",
            "barcode": "string",
            "factory_code": "string",
            "secondary_ids": [
                {
                    "id": "...",
                    "units": "...",
                    "sku": "..."
                }
            ]
        }
    ],
    "is_valued": false
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())

Responses

Response

json
{
  "id": "507f1f77bcf86cd799439011"
}

Success responses

201Production order createdapplication/json
object
idstring

Error responses

400Bad request — missing or invalid field
401Invalid or missing API keyapplication/json
403Insufficient permissionsapplication/json
429Rate limit exceededapplication/json