---
title: "POST /services/new_order/"
method: POST
path: "/services/new_order/"
tags: ["services"]
---

# POST /services/new_order/

`POST /services/new_order/`

## Request

- Base URL: `http://api.cannoli.app/api/v1`
- URL: `http://api.cannoli.app/api/v1/services/new_order/`
- Auth: none declared

Creates a new order, verifies if the email corresponds to a user,
if so, it adds the user to the order. If not, it creates a new user
with the email provided and adds it to the order.

## Request body

- Order
  - `id` integer
  - `email` string, email, required
  - `number_of_tasks` integer
  - `wants_newsletter` boolean
  - `first_name` string, required
  - `last_name` string, required
  - `brief` string, nullable
  - `coupon_code` string
  - `order_type` 'WD' | 'WOD'

## Response `201`

Created

- Order
  - `id` integer
  - `email` string, email, required
  - `number_of_tasks` integer
  - `wants_newsletter` boolean
  - `first_name` string, required
  - `last_name` string, required
  - `brief` string, nullable
  - `coupon_code` string
  - `order_type` 'WD' | 'WOD'

---

[API](https://skmtc.dev/cannoli/apis/cannoli-backend-api.md) - [All operations](https://skmtc.dev/cannoli/apis/cannoli-backend-api/llms.txt) - [OpenAPI document](https://skmtc.dev/cannoli/apis/cannoli-backend-api/revisions/d27aef14fd7a?raw)
