> For the complete documentation index, see [llms.txt](https://docs.voordemensen.nl/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.voordemensen.nl/api/public-endpoints/order.md).

# Order

## Create order and proceed to checkout

<mark style="color:green;">`POST`</mark> `https://api.voordemensen.nl/v1/:client_name/order/create`

Create a new order and redirect the end-user to the payment provider.

#### Path Parameters

| Name         | Type   | Description                                                        |
| ------------ | ------ | ------------------------------------------------------------------ |
| client\_name | string | the short name identifying you as a VdM client e.g. demo or fringe |

#### Request Body

| Name             | Type    | Description                                                                                                                                                                      |
| ---------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| redirectURL      | string  | the URL the payment provider will redirect the end-user to after payment - we will add the query **`?return=order_key`** to this URL so you can lookup the status of the payment |
| payment\_id      | integer | id of payment\_method                                                                                                                                                            |
| avg\_optin       | boolean | opt in for irregular contact regarding this order                                                                                                                                |
| avg\_mailinglist | boolean | opt in for mailinglist                                                                                                                                                           |
| email            | string  | email address                                                                                                                                                                    |
| firstname        | string  | first name                                                                                                                                                                       |
| lastname         | string  | last name                                                                                                                                                                        |
| phone            | string  | phone number                                                                                                                                                                     |
| address          | string  | address                                                                                                                                                                          |
| city             | string  | city                                                                                                                                                                             |
| zip              | string  | the zipcode                                                                                                                                                                      |
| cart\_id         | string  | the cart\_id to check out                                                                                                                                                        |

{% tabs %}
{% tab title="200 Order created." %}

```
[
    { 
        "url": "https://link-to-paymentprovider", 
        "order_key" : "unique-identifier-of-order"
    }

]
```

{% endtab %}
{% endtabs %}

## Get status of order/payment

<mark style="color:blue;">`GET`</mark> `https://api.voordemensen.nl/v1/:client_name/order/:order_key`

Check if the order is paid and display additional info. Use the order\_key to find the order. Upon return from the payment provider we will add the query parameter **`?response=order_key`** to the redirectURL (see above).&#x20;

#### Path Parameters

| Name                                           | Type   | Description                                                        |
| ---------------------------------------------- | ------ | ------------------------------------------------------------------ |
| order\_key<mark style="color:red;">\*</mark>   | string | the order\_key identifying the order                               |
| client\_name<mark style="color:red;">\*</mark> | string | the short name identifying you as a VdM client e.g. demo or fringe |

{% tabs %}
{% tab title="200 The status of the payment and additional info for you to display (links to) the tickets." %}

```
  "order_payment_status": "paid",
  "order_tickets_nr": 1,
  "order_tickets_url": "https://tickets.voordemensen.nl/client_name/order/XgFca-QmBxG-9WhAj-Osszb/ticket",
  "order_receipt_url": "https://tickets.voordemensen.nl/client_name/order/XgFca-QmBxG-9WhAj-Osszb/receipt",
  "seats": [
    {
      "seat_id": 2904,
      "event_name": "Your Event",
      "event_type": null
    }
  ]
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.voordemensen.nl/api/public-endpoints/order.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
