---
updatedAt: 2026-04-23T13:29:19.000Z
agentTools:
  projectIndex: https://developer.xentral.com/llms.txt
---

# Update purchase order

Updates an existing purchase order as long as no writing protection is active. When the writing protection is active only isConfirmed, confirmedVia, confirmedDeliveryDate and salesOrderConfirmationReference can be updated.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Xentral API",
    "version": "v0.1",
    "description": "Xentral is an ERP platform.",
    "contact": {
      "name": "Xentral",
      "url": "https://xentral.com",
      "email": "api@xentral.com"
    }
  },
  "tags": [
    {
      "name": "Purchase Order",
      "description": "Purchase Orders made at a supplier."
    }
  ],
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Bearer token obtained in POST /tokens endpoint or pregenerated in the system."
      }
    }
  },
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "servers": [
    {
      "url": "https://{xentralId}.xentral.biz",
      "description": "Your Xentral Instance",
      "variables": {
        "xentralId": {
          "default": "xentral"
        }
      }
    },
    {
      "url": "https://{domain}",
      "description": "Xentral at a custom domain",
      "variables": {
        "domain": {
          "default": "xentral.com"
        }
      }
    }
  ],
  "x-readme": {
    "samples-languages": []
  },
  "paths": {
    "/api/v1/purchaseOrders/{id}": {
      "patch": {
        "tags": [
          "Purchase Order"
        ],
        "operationId": "purchaseOrder.update",
        "summary": "Update purchase order",
        "description": "Updates an existing purchase order as long as no writing protection is active. When the writing protection is active only isConfirmed, confirmedVia, confirmedDeliveryDate and salesOrderConfirmationReference can be updated.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "description": "The resource's identifier.",
            "schema": {
              "type": "string",
              "pattern": "\\d+",
              "example": "17",
              "description": "Resource identifier."
            }
          }
        ],
        "requestBody": {
          "description": "Purchase order update request payload",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "date": {
                    "type": "string",
                    "format": "date",
                    "description": "Date of the purchase order."
                  },
                  "project": {
                    "description": "Reference to another resource",
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "id"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "\\d+",
                        "example": "17",
                        "description": "Resource identifier."
                      }
                    },
                    "example": {
                      "id": "1337"
                    }
                  },
                  "supplier": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "\\d+",
                        "example": "17",
                        "description": "Resource identifier."
                      },
                      "honorific": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "department": {
                        "type": "string"
                      },
                      "subDepartment": {
                        "type": "string"
                      },
                      "extraAddressLine": {
                        "type": "string"
                      },
                      "street": {
                        "type": "string"
                      },
                      "zipCode": {
                        "type": "string"
                      },
                      "city": {
                        "type": "string"
                      },
                      "state": {
                        "type": "string"
                      },
                      "country": {
                        "type": "string"
                      },
                      "contactPerson": {
                        "type": "string"
                      },
                      "telephone": {
                        "type": "string"
                      },
                      "telefax": {
                        "type": "string"
                      },
                      "email": {
                        "type": "string"
                      }
                    }
                  },
                  "requestForQuotation": {
                    "description": "ID of the request for quotation.",
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "id"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "\\d+",
                        "example": "17",
                        "description": "Resource identifier."
                      }
                    },
                    "example": {
                      "id": "1337"
                    }
                  },
                  "bodyIntroduction": {
                    "type": "string",
                    "description": "Text above the position table in the PDF."
                  },
                  "bodyOutroduction": {
                    "type": "string",
                    "description": "Text below the position table in the PDF."
                  },
                  "salesOrderConfirmationReference": {
                    "type": "string",
                    "description": "Reference of the sales order confirmation. Can be updated even if the write protection is active.",
                    "example": "SO-123456"
                  },
                  "isConfirmationRequested": {
                    "type": "boolean",
                    "description": "Shows if a confirmation is requested."
                  },
                  "suppliersOfferReference": {
                    "type": "string",
                    "description": "Offer reference of the supplier."
                  },
                  "internalDesignation": {
                    "type": "string",
                    "description": "Internal designation of the purchase order."
                  },
                  "language": {
                    "type": "object",
                    "additionalProperties": false,
                    "description": "Language of the purchase order.",
                    "properties": {
                      "iso2": {
                        "type": "string",
                        "pattern": "[A-Z]{2}"
                      }
                    },
                    "example": {
                      "iso2": "DE"
                    }
                  },
                  "isConfirmed": {
                    "type": "boolean",
                    "description": "Shows if the purchase order is confirmed. Can be updated even if the write protection is active."
                  },
                  "confirmedVia": {
                    "type": "string",
                    "enum": [
                      "Internet",
                      "E-Mail",
                      "Telephone",
                      "Telefax",
                      "Letter",
                      "Other"
                    ],
                    "default": "Internet",
                    "description": "Determines how the purchase order was confirmed. Can be updated even if the write protection is active."
                  },
                  "financials": {
                    "type": "object",
                    "additionalProperties": false,
                    "description": "Financial information about the purchase order.",
                    "properties": {
                      "paymentMethod": {
                        "description": "ID of the payment method used for the purchase order.",
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "id"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "\\d+",
                            "example": "17",
                            "description": "Resource identifier."
                          }
                        },
                        "example": {
                          "id": "1337"
                        }
                      },
                      "paymentTerms": {
                        "type": "object",
                        "additionalProperties": false,
                        "description": "Information about payment terms of the purchase order.",
                        "properties": {
                          "paymentTargetDiscount": {
                            "type": "number",
                            "format": "float"
                          },
                          "paymentTargetDays": {
                            "type": "number"
                          },
                          "paymentTargetDiscountDays": {
                            "type": "number"
                          },
                          "paymentTargetDiscountAmount": {
                            "type": "number",
                            "format": "float"
                          },
                          "isPaymentTargetDiscountApplied": {
                            "type": "boolean"
                          }
                        }
                      },
                      "costCenter": {
                        "type": "string",
                        "description": "The assigned cost center for the purchase order."
                      },
                      "tax": {
                        "type": "object",
                        "additionalProperties": false,
                        "description": "Tax information of the purchase order.",
                        "properties": {
                          "taxation": {
                            "type": "string",
                            "enum": [
                              "Domestic",
                              "EU delivery",
                              "Import",
                              "Tax free domestic"
                            ],
                            "default": "Domestic"
                          },
                          "vatId": {
                            "type": "string"
                          },
                          "taxDisplay": {
                            "type": "string",
                            "enum": [
                              "Automatic",
                              "Net",
                              "Gross"
                            ],
                            "default": "Automatic"
                          }
                        }
                      },
                      "currency": {
                        "type": "string",
                        "pattern": "[A-Z]{3}",
                        "enum": [
                          "EUR",
                          "USD",
                          "JPY",
                          "BGN",
                          "CZK",
                          "DKK",
                          "GBP",
                          "HUF",
                          "PLN",
                          "RON",
                          "SEK",
                          "CHF",
                          "ISK",
                          "NOK",
                          "HRK",
                          "RUB",
                          "TRY",
                          "AUD",
                          "BRL",
                          "CAD",
                          "CNY",
                          "HKD",
                          "IDR",
                          "ILS",
                          "INR",
                          "KRW",
                          "MXN",
                          "MYR",
                          "NZD",
                          "PHP",
                          "SGD",
                          "THB",
                          "ZAR",
                          "ARS",
                          "CLP",
                          "SAR",
                          "AED",
                          "QAR"
                        ],
                        "description": "Currency matches one of currency values as specified in ISO-4217.",
                        "example": "PLN"
                      }
                    }
                  },
                  "delivery": {
                    "type": "object",
                    "additionalProperties": false,
                    "description": "Delivery information of the purchase order.",
                    "properties": {
                      "deliveryTerms": {
                        "description": "Reference to another resource",
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "id"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "\\d+",
                            "example": "17",
                            "description": "Resource identifier."
                          }
                        },
                        "example": {
                          "id": "1337"
                        }
                      },
                      "hasDifferentDeliveryAddress": {
                        "type": "boolean"
                      },
                      "deliveryAddress": {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                          "honorific": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "department": {
                            "type": "string"
                          },
                          "subDepartment": {
                            "type": "string"
                          },
                          "extraAddressLine": {
                            "type": "string"
                          },
                          "street": {
                            "type": "string"
                          },
                          "zipCode": {
                            "type": "string"
                          },
                          "city": {
                            "type": "string"
                          },
                          "state": {
                            "type": "string"
                          },
                          "country": {
                            "type": "string"
                          },
                          "contactPerson": {
                            "type": "string"
                          }
                        }
                      },
                      "dates": {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                          "desiredDeliveryDate": {
                            "type": "string",
                            "format": "date",
                            "nullable": true,
                            "description": "Desired delivery date of the purchase order."
                          },
                          "confirmedDeliveryDate": {
                            "type": "string",
                            "format": "date",
                            "nullable": true,
                            "description": "Confirmed delivery date of the purchase order. Can be updated even if the write protection is active."
                          }
                        }
                      }
                    }
                  },
                  "formatting": {
                    "type": "object",
                    "additionalProperties": false,
                    "description": "Formatting settings for the PDF of a purchase order.",
                    "properties": {
                      "hideLetterHead": {
                        "type": "boolean"
                      },
                      "hidePrices": {
                        "type": "boolean"
                      },
                      "hideProductNumbers": {
                        "type": "boolean"
                      },
                      "showLongProductNumbers": {
                        "type": "boolean"
                      },
                      "hideProductDescriptions": {
                        "type": "boolean"
                      },
                      "showOwnProductNumberInColumn": {
                        "type": "boolean"
                      }
                    }
                  },
                  "internalComment": {
                    "type": "string",
                    "description": "Internal comment about the purchase order."
                  },
                  "liabilitiesInfo": {
                    "type": "string",
                    "description": "Information for liabilities."
                  },
                  "positions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "\\d+",
                          "example": "17",
                          "description": "Resource identifier."
                        },
                        "project": {
                          "description": "Reference to another resource",
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "id"
                          ],
                          "properties": {
                            "id": {
                              "type": "string",
                              "pattern": "\\d+",
                              "example": "17",
                              "description": "Resource identifier."
                            }
                          },
                          "example": {
                            "id": "1337"
                          }
                        },
                        "product": {
                          "type": "object",
                          "description": "Reference to position Product, only one value is allowed at a time",
                          "additionalProperties": false,
                          "properties": {
                            "id": {
                              "type": "string",
                              "pattern": "\\d+",
                              "example": "17",
                              "description": "Resource identifier."
                            },
                            "sku": {
                              "type": "string",
                              "example": "SKU1"
                            },
                            "externalReferenceNumber": {
                              "type": "string",
                              "example": "REF2"
                            }
                          }
                        },
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "quantity": {
                          "type": "number",
                          "format": "float"
                        },
                        "delivered": {
                          "type": "number",
                          "format": "float"
                        },
                        "price": {
                          "description": "Money object with amount and currency",
                          "example": {
                            "amount": "13.37",
                            "currency": "EUR"
                          },
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "amount": {
                              "description": "A string representing the amount",
                              "type": "string",
                              "format": "float",
                              "example": "24.99"
                            },
                            "currency": {
                              "type": "string",
                              "pattern": "[A-Z]{3}",
                              "enum": [
                                "EUR",
                                "USD",
                                "JPY",
                                "BGN",
                                "CZK",
                                "DKK",
                                "GBP",
                                "HUF",
                                "PLN",
                                "RON",
                                "SEK",
                                "CHF",
                                "ISK",
                                "NOK",
                                "HRK",
                                "RUB",
                                "TRY",
                                "AUD",
                                "BRL",
                                "CAD",
                                "CNY",
                                "HKD",
                                "IDR",
                                "ILS",
                                "INR",
                                "KRW",
                                "MXN",
                                "MYR",
                                "NZD",
                                "PHP",
                                "SGD",
                                "THB",
                                "ZAR",
                                "ARS",
                                "CLP",
                                "SAR",
                                "AED",
                                "QAR"
                              ],
                              "description": "Currency matches one of currency values as specified in ISO-4217.",
                              "example": "PLN"
                            }
                          }
                        },
                        "tax": {
                          "type": "object",
                          "additionalProperties": false,
                          "description": "Tax information of the purchase order position.",
                          "properties": {
                            "vatCategory": {
                              "type": "string",
                              "enum": [
                                "standard",
                                "reduced",
                                "free"
                              ]
                            },
                            "taxText": {
                              "type": "string"
                            },
                            "rate": {
                              "type": "number",
                              "format": "float"
                            }
                          }
                        },
                        "isDeleted": {
                          "type": "boolean"
                        }
                      }
                    }
                  }
                }
              },
              "examples": {
                "example": {
                  "value": {
                    "date": "2024-01-01",
                    "project": {
                      "id": "1001"
                    },
                    "supplier": {
                      "id": "2001",
                      "honorific": "",
                      "name": "Supplier 1",
                      "department": "",
                      "subDepartment": "",
                      "extraAddressLine": "",
                      "street": "ExampleStreet 5",
                      "zipCode": "",
                      "city": "",
                      "state": "",
                      "country": "",
                      "contactPerson": "",
                      "telephone": "1234567890",
                      "telefax": "",
                      "email": ""
                    },
                    "requestForQuotation": {
                      "id": "6002"
                    },
                    "bodyIntroduction": "",
                    "bodyOutroduction": "",
                    "salesOrderConfirmationReference": "",
                    "isConfirmationRequested": false,
                    "internalDesignation": "",
                    "language": {
                      "iso2": "DE"
                    },
                    "suppliersOfferReference": "",
                    "isConfirmed": false,
                    "confirmedVia": "Internet",
                    "financials": {
                      "paymentMethod": {
                        "id": "4002"
                      },
                      "paymentTerms": {
                        "paymentTargetDiscount": 0,
                        "paymentTargetDays": 0,
                        "paymentTargetDiscountDays": 0,
                        "paymentTargetDiscountAmount": 0,
                        "isPaymentTargetDiscountApplied": false
                      },
                      "costCenter": "",
                      "tax": {
                        "taxation": "Domestic",
                        "vatId": "",
                        "taxDisplay": "Automatic"
                      },
                      "currency": "EUR"
                    },
                    "delivery": {
                      "deliveryTerms": {
                        "id": "7002"
                      },
                      "hasDifferentDeliveryAddress": true,
                      "deliveryAddress": {
                        "honorific": "",
                        "name": "Delivery Address Name",
                        "department": "",
                        "subDepartment": "",
                        "extraAddressLine": "",
                        "street": "",
                        "zipCode": "",
                        "city": "",
                        "state": "",
                        "country": "",
                        "contactPerson": ""
                      },
                      "dates": {
                        "desiredDeliveryDate": null,
                        "confirmedDeliveryDate": null
                      }
                    },
                    "formatting": {
                      "hideLetterHead": false,
                      "hidePrices": false,
                      "hideProductNumbers": false,
                      "showLongProductNumbers": false,
                      "hideProductDescriptions": false,
                      "showOwnProductNumberInColumn": false
                    },
                    "internalComment": "",
                    "liabilitiesInfo": "",
                    "positions": []
                  }
                }
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Operation completed successfully, no response body"
          },
          "400": {
            "description": "IETF RFC 9457 Problem API compliant response",
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "type",
                        "title",
                        "violations"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "https://api.xentral.biz/problems/request-validation"
                          ]
                        },
                        "title": {
                          "type": "string",
                          "minLength": 1,
                          "example": "Request payload validation failed."
                        },
                        "violations": {
                          "oneOf": [
                            {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "example": {
                                  "username": [
                                    "This value should not be blank."
                                  ],
                                  "email": [
                                    "This value is not a valid email address."
                                  ]
                                }
                              },
                              "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages."
                            },
                            {
                              "type": "object",
                              "example": {
                                "_": [
                                  "This value should contain at most `9` elements."
                                ]
                              },
                              "description": "This field will be a mirrored request payload with only invalid fields and values replaced by error messages."
                            }
                          ]
                        }
                      }
                    },
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "type",
                        "title",
                        "messages"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "https://api.xentral.biz/problems/generic-validation"
                          ]
                        },
                        "title": {
                          "type": "string",
                          "minLength": 1
                        },
                        "messages": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "type",
                        "title",
                        "messages"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "https://api.xentral.biz/problems/conflict"
                          ]
                        },
                        "title": {
                          "type": "string",
                          "minLength": 1
                        },
                        "messages": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "type",
                        "title",
                        "items"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "https://api.xentral.biz/problems/conflictItems"
                          ]
                        },
                        "title": {
                          "type": "string",
                          "minLength": 1
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "required": [
                              "id",
                              "title",
                              "messages"
                            ],
                            "properties": {
                              "id": {
                                "type": "integer"
                              },
                              "title": {
                                "type": "string",
                                "minLength": 1
                              },
                              "messages": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "type",
                        "title",
                        "scopes"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "https://developer.xentral.com/reference/problems#token-scopes"
                          ]
                        },
                        "title": {
                          "type": "string",
                          "minLength": 1
                        },
                        "scopes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "type",
                        "title",
                        "messages"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "https://api.xentral.biz/problems/generic-validation"
                          ]
                        },
                        "title": {
                          "type": "string",
                          "minLength": 1
                        },
                        "messages": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unable to authenticate the client",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "description": "Error message explaining why the request failed.",
                      "example": "Missing required scopes: customer:create."
                    }
                  }
                },
                "example": {
                  "message": "Missing required scopes: customer:create."
                }
              },
              "text/html": {
                "schema": {
                  "type": "string",
                  "example": "Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Unable to authorize the client"
          },
          "404": {
            "description": "Resource was not found or not enough access privileges"
          },
          "409": {
            "description": "Request conflict with the current state of the target resource",
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "type",
                        "title",
                        "messages"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "https://api.xentral.biz/problems/conflict"
                          ]
                        },
                        "title": {
                          "type": "string",
                          "minLength": 1
                        },
                        "messages": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "type",
                        "title",
                        "items"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "https://api.xentral.biz/problems/conflictItems"
                          ]
                        },
                        "title": {
                          "type": "string",
                          "minLength": 1
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "required": [
                              "id",
                              "title",
                              "messages"
                            ],
                            "properties": {
                              "id": {
                                "type": "integer"
                              },
                              "title": {
                                "type": "string",
                                "minLength": 1
                              },
                              "messages": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "415": {
            "description": "Resource representation send in the request is not supported."
          },
          "429": {
            "description": "Too many API calls made."
          }
        }
      }
    }
  }
}
```