---
agentTools:
  projectIndex: https://konvex.readme.io/llms.txt
---

# Create purchase order

This endpoint allows the creation of a new Purchase Order. A Purchase Order is a document used to authorize the purchase of products or services from a vendor. This endpoint facilitates the creation of purchase orders, which can include details about the items or services being purchased, the vendor involved, quantities requested, agreed-upon prices, delivery dates, and receiving locations, among other relevant information. <code>Sap by design </code>

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Konvex Universal API",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.getkonvex.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "name": "X-Secret",
        "in": "header",
        "x-default": ""
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/core/api/purchases/orders": {
      "post": {
        "summary": "Create purchase order",
        "description": "This endpoint allows the creation of a new Purchase Order. A Purchase Order is a document used to authorize the purchase of products or services from a vendor. This endpoint facilitates the creation of purchase orders, which can include details about the items or services being purchased, the vendor involved, quantities requested, agreed-upon prices, delivery dates, and receiving locations, among other relevant information. <code>Sap by design </code>",
        "operationId": "create-purchase-order",
        "parameters": [
          {
            "name": "x-software",
            "in": "header",
            "description": "Name of the ERP or accounting software from which you want to get the information Siigo Alegra Quickbooks Contifico NetSuite Odoo",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "netsuite",
                "alegra",
                "sap",
                "sap-by-design"
              ]
            }
          },
          {
            "name": "x-connection",
            "in": "header",
            "description": "If you send the x-connection, the connection will already be secured, and there will be no need to send the connection headers for each software. Optional for: Siigo Alegra Quickbooks Contifico Netsuite Odoo, <code>Sap by design </code>",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-user",
            "in": "header",
            "description": "User of ERP API connection For Netsuite: null Siigo Alegra Quickbooks Contifico NetSuite Odoo <code>Sap by design </code>",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-apikey",
            "in": "header",
            "description": "Apikey or token of ERP API connection For Netsuite: null Siigo Alegra Quickbooks Contifico NetSuite Odoo <code>Sap by design </code>",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-testing",
            "in": "header",
            "description": "x-testing is used for building the environment. could be sandbox or production (true: sandbox, false: production) Siigo Alegra Quickbooks Contifico NetSuite Odoo",
            "required": true,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "x-consumer-key",
            "in": "header",
            "description": "Consumer Key generated for Netsuite",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-consumer-secret",
            "in": "header",
            "description": "Consumer Secret generated for: Netsuite",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-access-token",
            "in": "header",
            "description": "Access Token credential generated for: Netsuite",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-token-secret",
            "in": "header",
            "description": "Token Secret generated for: Netsuite",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-realm",
            "in": "header",
            "description": "Unique identifier assigned to each NetSuite account Netsuite",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-url",
            "in": "header",
            "description": "The Base URL used for the NetSuite REST Netsuite Odoo <code>Sap by design </code>",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-db",
            "in": "header",
            "description": "ERP database name Odoo",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "supplier",
                  "Comments",
                  "items",
                  "date",
                  "dueDate",
                  "deliveryDate"
                ],
                "properties": {
                  "supplier": {
                    "type": "object",
                    "description": "Specifies the supplier from whom the goods or services are being purchased",
                    "required": [
                      "id"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "The unique ID of the supplier"
                      }
                    }
                  },
                  "Comments": {
                    "type": "string",
                    "description": "A comment or note related to the purchase order"
                  },
                  "items": {
                    "type": "array",
                    "description": "the items being purchased",
                    "items": {
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "The unique identifier (SKU) of the item being purchased"
                        },
                        "quantity": {
                          "type": "integer",
                          "description": "The quantity of the item being ordered",
                          "format": "int32"
                        },
                        "observations": {
                          "type": "string"
                        },
                        "price": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "quantity",
                        "observations",
                        "price"
                      ],
                      "type": "object"
                    }
                  },
                  "date": {
                    "type": "string",
                    "format": "date"
                  },
                  "dueDate": {
                    "type": "string",
                    "format": "date"
                  },
                  "deliveryDate": {
                    "type": "string",
                    "format": "date"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"status\": 200,\n    \"software\": [ERP_NAME],\n    \"data\": \"\",\n    \"pagination\": {}\n}"
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "654c4fc4d4a41c002a458704:671a775eb03966005a8d4ca8"
}
```