---
updatedAt: 2026-10-22T05:50:26.000Z
agentTools:
  projectIndex: https://developer.xentral.com/llms.txt
---

# 🔒 Assign purchase order to supplier invoice V3

This endpoint is currently in Beta and available for testing. It may contain bugs, and breaking changes can occur at any time without prior notice. We do not recommend using Beta endpoints in production environments. Should you choose to use it in production, you assume full responsibility for any resulting issues.

This endpoint requires the following scopes: `supplierInvoice:update`.

Assign a purchase order to a supplier invoice. An invoice can be split across several purchase orders, and the same purchase order can be assigned more than once, each assignment stating its own share of the invoice. Nothing is taken over from either document, and assignments never change the totals of the invoice.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Xentral Business Documents API v3",
    "description": "The Xentral Business Documents API v3 for working with sales orders, offers, invoices, credit notes, delivery notes, return orders, purchase orders, proforma invoices and productions.\n\nIndividual endpoints marked as *Beta* may still change without prior notice — see the respective endpoint descriptions.\n\nRequest payloads may contain properties that an endpoint does not define; these are ignored rather than rejected. Nothing is stored for them and no error is returned, so check the response body to confirm which values were actually applied.",
    "contact": {
      "name": "API Support",
      "url": "https://xentral.com",
      "email": "api@xentral.com"
    },
    "version": "0.2.0"
  },
  "servers": [
    {
      "url": "https://{xentralId}.xentral.biz",
      "description": "Your xentral instance",
      "variables": {
        "xentralId": {
          "default": "my-company",
          "description": "Your Xentral instance ID"
        }
      }
    },
    {
      "url": "https://{domain}",
      "description": "Xentral with a custom domain",
      "variables": {
        "domain": {
          "default": "demo.xentral.com",
          "description": "Your Xentral custom domain"
        }
      }
    }
  ],
  "components": {
    "schemas": {
      "CreateSupplierInvoicePurchaseOrderAssignmentRequest": {
        "required": [
          "purchaseOrder"
        ],
        "properties": {
          "purchaseOrder": {
            "description": "The purchase order to assign to the invoice.",
            "required": [
              "id"
            ],
            "properties": {
              "id": {
                "description": "The purchase order ID.",
                "type": "string",
                "example": "5"
              }
            },
            "type": "object"
          },
          "project": {
            "description": "The project this assignment is booked to. Reporting sums the assigned amounts per project, so an assignment without a project is not counted towards one. Not derived from the purchase order.",
            "required": [
              "id"
            ],
            "properties": {
              "id": {
                "description": "The project ID.",
                "type": "string",
                "example": "1"
              }
            },
            "type": "object"
          },
          "salesOrder": {
            "description": "The sales order the assigned purchase order was ordered for.",
            "required": [
              "id"
            ],
            "properties": {
              "id": {
                "description": "The sales order ID.",
                "type": "string",
                "example": "42"
              }
            },
            "type": "object"
          },
          "amountGross": {
            "description": "Gross share of the invoice attributed to this purchase order. Use it to split an invoice across several purchase orders; it is never derived from either document and never changes the invoice total.",
            "required": [
              "amount",
              "currency"
            ],
            "properties": {
              "amount": {
                "description": "The monetary amount. Must be between -99999999.99 and 99999999.99.",
                "type": "string",
                "example": "119.00"
              },
              "currency": {
                "description": "ISO 4217 currency code; must match the invoice currency.",
                "type": "string",
                "example": "EUR"
              }
            },
            "type": "object"
          },
          "amountNet": {
            "description": "Net share of the invoice attributed to this purchase order. Independent of `amountGross`: neither is calculated from the other or from a tax rate.",
            "required": [
              "amount",
              "currency"
            ],
            "properties": {
              "amount": {
                "description": "The monetary amount. Must be between -99999999.99 and 99999999.99.",
                "type": "string",
                "example": "100.00"
              },
              "currency": {
                "description": "ISO 4217 currency code; must match the invoice currency.",
                "type": "string",
                "example": "EUR"
              }
            },
            "type": "object"
          },
          "costCenter": {
            "description": "Number of the cost center this assignment is booked to. Independent of the cost center of the invoice, which is not inherited here.",
            "type": [
              "string",
              "null"
            ],
            "maxLength": 20,
            "example": "1000"
          },
          "comment": {
            "description": "Free-text comment on the assignment, shown with it on the invoice.",
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255,
            "example": "Partial delivery, remainder invoiced separately"
          }
        },
        "type": "object"
      },
      "Money": {
        "description": "Money",
        "properties": {
          "amount": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              }
            ]
          },
          "currency": {
            "description": "Currency",
            "type": "string",
            "example": "EUR"
          }
        },
        "type": "object",
        "example": {
          "amount": "13.37",
          "currency": "EUR"
        },
        "additionalProperties": false
      },
      "SupplierInvoicePurchaseOrderAssignment": {
        "description": "A purchase order assigned to a supplier invoice.",
        "required": [
          "id",
          "supplierInvoice",
          "purchaseOrder",
          "project",
          "salesOrder",
          "amountGross",
          "amountNet",
          "costCenter",
          "comment"
        ],
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/TimestampsResource"
          },
          {
            "properties": {
              "id": {
                "description": "The assignment ID. A purchase order can be assigned to the same invoice more than once, so this identifies the assignment, not the purchase order.",
                "type": "string",
                "example": "1"
              },
              "supplierInvoice": {
                "description": "The supplier invoice the purchase order is assigned to.",
                "properties": {
                  "id": {
                    "description": "The supplier invoice ID.",
                    "type": "string",
                    "example": "1"
                  }
                },
                "type": "object"
              },
              "purchaseOrder": {
                "description": "The assigned purchase order.",
                "required": [
                  "id",
                  "documentNumber"
                ],
                "properties": {
                  "id": {
                    "description": "The purchase order ID.",
                    "type": "string",
                    "example": "5"
                  },
                  "documentNumber": {
                    "description": "Document number of the purchase order. Null while the purchase order is still a draft and has not been assigned one.",
                    "type": [
                      "string",
                      "null"
                    ],
                    "example": "B-2026-0042"
                  }
                },
                "type": [
                  "object",
                  "null"
                ]
              },
              "project": {
                "description": "The project this assignment is booked to. Null when it is booked to none.",
                "properties": {
                  "id": {
                    "description": "The project ID.",
                    "type": "string",
                    "example": "1"
                  }
                },
                "type": [
                  "object",
                  "null"
                ]
              },
              "salesOrder": {
                "description": "The sales order the assigned purchase order was ordered for. Null when it was ordered for none.",
                "properties": {
                  "id": {
                    "description": "The sales order ID.",
                    "type": "string",
                    "example": "42"
                  }
                },
                "type": [
                  "object",
                  "null"
                ]
              },
              "amountGross": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/Money",
                    "description": "Gross share of the invoice attributed to this purchase order, in the currency of the invoice. Null when no share was stated."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Gross share of the invoice attributed to this purchase order, in the currency of the invoice. Null when no share was stated."
              },
              "amountNet": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/Money",
                    "description": "Net share of the invoice attributed to this purchase order, in the currency of the invoice. Null when no share was stated."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Net share of the invoice attributed to this purchase order, in the currency of the invoice. Null when no share was stated."
              },
              "costCenter": {
                "description": "Number of the cost center this assignment is booked to. Null when it is booked to none.",
                "type": [
                  "string",
                  "null"
                ],
                "example": "1000"
              },
              "comment": {
                "description": "Free-text comment on the assignment.",
                "type": [
                  "string",
                  "null"
                ],
                "example": "Partial delivery, remainder invoiced separately"
              }
            },
            "type": "object"
          }
        ]
      },
      "TimestampsResource": {
        "properties": {
          "createdAt": {
            "description": "The date and time when the resource was created.",
            "type": "string",
            "format": "date-time",
            "example": "2023-10-01T12:00:00Z"
          },
          "updatedAt": {
            "description": "The date and time when the resource was last updated.",
            "type": "string",
            "format": "date-time",
            "example": "2023-10-01T12:00:00Z"
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "SupplierInvoice",
      "description": "SupplierInvoice"
    }
  ],
  "paths": {
    "/api/v3/supplierInvoices/{id}/purchaseOrders": {
      "post": {
        "tags": [
          "SupplierInvoice"
        ],
        "summary": "🔒 Assign purchase order to supplier invoice V3",
        "description": "This endpoint is currently in Beta and available for testing. It may contain bugs, and breaking changes can occur at any time without prior notice. We do not recommend using Beta endpoints in production environments. Should you choose to use it in production, you assume full responsibility for any resulting issues.\n\nThis endpoint requires the following scopes: `supplierInvoice:update`.\n\nAssign a purchase order to a supplier invoice. An invoice can be split across several purchase orders, and the same purchase order can be assigned more than once, each assignment stating its own share of the invoice. Nothing is taken over from either document, and assignments never change the totals of the invoice.",
        "operationId": "POST::api-v3-supplierinvoices-id-purchaseorders",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSupplierInvoicePurchaseOrderAssignmentRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Assign a purchase order to a supplier invoice. An invoice can be split across several purchase orders, and the same purchase order can be assigned more than once, each assignment stating its own share of the invoice. Nothing is taken over from either document, and assignments never change the totals of the invoice.",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SupplierInvoicePurchaseOrderAssignment"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Failed validation",
            "content": {
              "application/problem+json": {
                "schema": {
                  "properties": {
                    "type": {
                      "description": "Error messages",
                      "type": "string",
                      "example": "https://api.xentral.biz/problems/request-validation"
                    },
                    "title": {
                      "description": "Error messages",
                      "type": "string",
                      "example": "Request payload validation failed."
                    },
                    "violations": {
                      "description": "Error messages",
                      "type": "object",
                      "example": {
                        "purchaseOrder": [
                          "The purchase order field is required."
                        ],
                        "project": [
                          "The project field is invalid."
                        ],
                        "salesOrder": [
                          "The salesOrder field is invalid."
                        ]
                      }
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "409": {
            "description": "Problem occurred",
            "content": {
              "application/problem+json": {
                "schema": {
                  "properties": {
                    "type": {
                      "description": "A URI reference that identifies the problem type.",
                      "type": "string",
                      "example": "https://api.xentral.biz/problems/write-protected"
                    },
                    "title": {
                      "description": "A short, human-readable summary of the problem type.",
                      "type": "string",
                      "example": "The resource is write-protected."
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "message": {
                      "description": "Too Many Requests",
                      "type": "string",
                      "example": "Too Many Requests"
                    }
                  },
                  "type": "object"
                }
              }
            }
          }
        },
        "x-beta": true,
        "x-scopes": [
          "supplierInvoice:update"
        ]
      }
    }
  }
}
```