---
agentTools:
  projectIndex: https://worldbox-api.readme.io/llms.txt
---

# Commit Order

Commit an order. An order contains one or an infinite number of orderitems.

**Please be aware**

* If you order a report for a company that is found in the Worldbox index, the **win number is mandatory**.

* If you order a legal document or an offline report for a **company not found in the index** and therefore win-number is not yet defined, **enter the companyrequestid** which is returned from "Send CompanyRequest". Important: **For each product, either a win-number or an existing companyrequestid must be specified.**

* The price and currency will be taken from your Worldbox price table and account settings! If you don't have a customer price table the official retail price is taken.

**Attention**
Access to the Worldbox index for company data is restricted on the test server. We will provide you with a sandbox list for testing.

**RequestBody**
The webservice expects a real JSON-string in the request-body with content-type:application/json.
Below is the JSON-Object structure containing an array of order items.

[block:code]
{
  "codes": [
    {
      "code": "{\n   orderitems:[\n      {\n         language:\"DE\",\n         customerreference:123456,\n         win:\"CH0000041446\",\n         productcode: \"DLF150\",\n\t\t\t\t format:\"PDF\",        \n         additionalinfo:\"Any information accompanying the order\"\n      },\n      {\n         language:\"DE\",\n         customerreference:123456,\n         win:\"CH0000041446\",\n         productcode: \"DLF150\",\n         format:\"xml\",       \n         additionalinfo:\"Any information accompanying the order\"\n      }\n   ]\n}",
      "language": "json"
    }
  ]
}
[/block]

**Result**

[block:code]
{
  "codes": [
    {
      "code": "{\n    ordernumber: 5966220642,\n    orderitem: [\n        {\n            company: \"Ascom (Schweiz) AG\",\n            reference: 123456,\n            name: \"Credit Report online\",\n            language: \"DE\",\n            format: \"XML\",\n            statuscode: 3,\n            status: \"processing\",\n            productcode: \"DLF150\",\n            itemnumber: \"1409B0113\",\n            comment: \"\"\n        },\n        {\n            company: \"Ascom (Schweiz) AG\",\n            reference: 123456,\n            name: \"Financial Report online\",\n            language: \"DE\",\n            format: \"PDF\",\n            statuscode: 3,\n            status: \"processing\",\n            productcode: \"DLF150\",\n            itemnumber: \"1409B0114\",\n            comment: \"\"\n        }\n    ],\n    date: \"2014-09-08T13:13:43Z\",\n    charge: \"CHF 77.75\"\n}",
      "language": "json"
    }
  ]
}
[/block]

**Example JSON-request for company request without win-number**
Use case: The company is not found in the Worldbox index and has therefore not yet a win-number. A "Company Request" has to be sent before in order to get a "companyrequestid".

[block:code]
{
  "codes": [
    {
      "code": "{\n   \"orderitems\":[\n      {\n         \"language\":\"EN\",\n         \"name\": \"Credit/Investigation report express (offline)\",\n         \"customerreference\":\"API test order company request\",\n         \"companyrequestid\": \"ff80808151ff6f4c015245fc84f400cf\",\n         \"productcode\": \"REO125\",\n         \"format\":\"PDF\",\n         \"additionalinfo\":\"orderitem additional info customer text\"\n      }\n   ]\n}",
      "language": "json"
    }
  ]
}
[/block]

[block:callout]
{
  "type": "info",
  "title": "Update for existing API consumers",
  "body": "We streamlined the parameters used to commit an order. The order parameters 'country code, type and price are now all deprecated.\n\nTo make it easier to  identify we use now product codes instead of the product id as identifier for example:  Credit Report online has \"productcode\": \"DLF150\".\n\nPlease note that all changed API endpoints above maintain backward compatibility. But for new integrations we suggest to use the updated version."
}
[/block]

[block:callout]
{
  "type": "warning",
  "body": "The \"try it out\" demo below to commit an order is disabled!",
  "title": "Please note:"
}
[/block]

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "API Settings",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://testapi.worldbox.ch/v1"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/order": {
      "post": {
        "summary": "Commit Order",
        "description": "Commit an order. An order contains one or an infinite number of orderitems.",
        "operationId": "commit-order",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "productcode",
                  "win"
                ],
                "properties": {
                  "productcode": {
                    "type": "string",
                    "description": "The product code for required report, monitoring or legal document"
                  },
                  "win": {
                    "type": "string",
                    "description": "The win number of the company"
                  },
                  "language": {
                    "type": "string",
                    "description": "Language of the report. Choose DE, EN or IT. Default is EN.",
                    "default": "EN"
                  },
                  "format": {
                    "type": "string",
                    "description": "The return format of the document. Worldbox supports PDF, XML, JSON, RTF or DOCX for business reports. If don't provide the format in your order, PDF is taken as the default format. Attention: Only PDF, JSON and XML is supported for all reports! Legal documents are only available as PDF.",
                    "default": "PDF"
                  },
                  "companyrequestid": {
                    "type": "string",
                    "description": "The companyrequest ID which is returned from Send Company Request"
                  },
                  "customerreference": {
                    "type": "string",
                    "description": "Customer reference code for internal use"
                  },
                  "additionalinfo": {
                    "type": "string",
                    "description": "Any information accompanying the order (max. 4000 characters)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    ordernumber: 5966220642,\n    orderitem: [\n        {\n            company: \"Ascom (Schweiz) AG\",\n            reference: 123456,\n            name: \"Credit Report online\",\n            language: \"DE\",\n            format: \"XML\",\n            statuscode: 3,\n            status: \"processing\",\n            productcode: \"DLF150\",\n            itemnumber: \"1409B0113\",\n            comment: \"\"\n        },\n        {\n            company: \"Ascom (Schweiz) AG\",\n            reference: 123456,\n            name: \"Financial Report online\",\n            language: \"DE\",\n            format: \"PDF\",\n            statuscode: 3,\n            status: \"processing\",\n            productcode: \"DLF130\",\n            itemnumber: \"1409B0114\",\n            comment: \"\"\n        }\n    ],\n    date: \"2014-09-08T13:13:43Z\",\n    charge: \"CHF 77.75\"\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": "6303ce04ea33c13c8859c3a3:5491d39312d0c00b00c80d26"
}
```