Skip to main content
PUT

Update a production order

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

Updates an existing production order.

Parameters

Path parameters

productionOrderIdstringrequired

Production Order ID (24-char hex ObjectId)

Request body

object
descriptionstring
datestring<date>

Issue date in ISO 8601 format

due_datestring<date>

Due date in ISO 8601 format

contact_idstring
contact_namestring
supplier_idstring
supplier_namestring
notesstring
currencystring
languagestring
tags[]string[]
source_warehouse_idstring
destination_warehouse_idstring
manufacturing_pipeline_idstring
manufactured_productobject
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[]
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_valuedboolean

Request

python
import requests

url = "https://api.holded.com/api/v2/production-orders/{productionOrderId}"
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.put(url, headers=headers, json=payload)
print(response.json())

Responses

Response

json
{
  "id": "string"
}

Success responses

200Production order updatedapplication/json
object
idstring

Error responses

401Invalid or missing API keyapplication/json
403Insufficient permissionsapplication/json
404Production order not foundapplication/json
429Rate limit exceededapplication/json