Alladdin

Work in progress

Site en construction

الموقع قيد الإنشاء

Alladdin
PUT

Update a production order

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

Updates an existing production order.

Parameters

Path parameters

productionOrderId string required

Production Order ID (24-char hex ObjectId)

Request body

object description string date string<date>

Issue date in ISO 8601 format

due_date string<date>

Due date in ISO 8601 format

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 object product_id string required name string required sku string optional kind string optional

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

Enum: simple lots pack variants serialnumbers quantity number optional variant_ids[] object[] optional materials[] object[] name string description string type string Enum: product service line kind string

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

Enum: simple lots variants serialnumbers pack product_id string units number price number sku string barcode string factory_code string 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_valued boolean

Request

python
import requests

url = "https://api.alladdin.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

200 Production order updated application/json object id string

Error responses

401 Invalid or missing API key application/json 403 Insufficient permissions application/json 404 Production order not found application/json 429 Rate limit exceeded application/json

← PreviousCreate a production order →

Next →List production orders →