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

# Create purchase order

Creates a new purchase order.

# 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": {
      "post": {
        "tags": [
          "Purchase Order"
        ],
        "operationId": "purchaseOrder.create",
        "summary": "Create purchase order",
        "description": "Creates a new purchase order.",
        "parameters": [],
        "requestBody": {
          "description": "Purchase order create request payload",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "date",
                  "supplier",
                  "project"
                ],
                "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,
                    "required": [
                      "id"
                    ],
                    "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."
                  },
                  "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."
                  },
                  "confirmedVia": {
                    "type": "string",
                    "enum": [
                      "Internet",
                      "E-Mail",
                      "Telephone",
                      "Telefax",
                      "Letter",
                      "Other"
                    ],
                    "description": "Determines how the purchase order was confirmed."
                  },
                  "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"
                            ]
                          },
                          "vatId": {
                            "type": "string"
                          },
                          "taxDisplay": {
                            "type": "string",
                            "enum": [
                              "Automatic",
                              "Net",
                              "Gross"
                            ]
                          }
                        }
                      },
                      "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."
                          }
                        }
                      }
                    }
                  },
                  "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."
                  },
                  "differingDesignation": {
                    "type": "boolean",
                    "description": "Whether the purchase order uses differing designation."
                  },
                  "positions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "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": {
                          "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"
                          }
                        },
                        "salesOrderPosition": {
                          "description": "Link the purchase order position to an existing sales order position id (or null if not linked)",
                          "type": "object",
                          "additionalProperties": false,
                          "nullable": true,
                          "required": [
                            "id"
                          ],
                          "properties": {
                            "id": {
                              "type": "string",
                              "pattern": "\\d+",
                              "example": "17",
                              "description": "Resource identifier."
                            }
                          },
                          "example": {
                            "id": "1337"
                          }
                        },
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "quantity": {
                          "type": "number",
                          "format": "float"
                        },
                        "deliveryDate": {
                          "type": "string",
                          "format": "date",
                          "nullable": true,
                          "description": "Delivery date for this position."
                        },
                        "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"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              },
              "examples": {
                "example": {
                  "value": {
                    "date": "2024-01-01",
                    "project": {
                      "id": "1001"
                    },
                    "supplier": {
                      "id": "2001"
                    },
                    "positions": [
                      {
                        "product": {
                          "id": "3001"
                        },
                        "quantity": 10,
                        "salesOrderPosition": {
                          "id": "1"
                        }
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Resource successfully created response",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string",
                  "example": "https://example.xentral.biz/api/users/17"
                },
                "description": "URI of the created resource"
              }
            },
            "content": {
              "text/html": {
                "schema": {
                  "type": "string",
                  "enum": [
                    ""
                  ],
                  "nullable": true
                }
              }
            }
          },
          "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"
          },
          "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."
          }
        }
      }
    }
  }
}
```