---
title: "Create new basket"
method: POST
path: "/baskets"
tags: ["baskets"]
---

# Create new basket

`POST /baskets`

## Request body

- CreateBasketRequest
  - `order_hash` string — order unique id should be unique per client
  - `discount_type` 0 | 1 — 0 - percentage discount 1 - amount discount
  - `discount` integer — amount of discount when discount type is percentage discount [0]
  - `discount_margin` integer — amount of discount when discount type is amount discount [1]
  - `parked_order` integer — uid of parked order
  - `extend_reference_text` string
  - `code` string
  - `return_reason` integer
  - `comment` string
  - `creation_time` integer — unix timestamp
  - `cash_register` integer
  - `type` integer — type of payment > default payment types are: > 0 - CARD 1 - MOBILE 2 - GIFT 3 - CASH 4 - MIXED 6 - INVOICE
  - `table_id` integer
  - `cash_invoice` integer
  - `card_data` string — json encoded device card data
  - `frame_text` string
  - `staff` integer
  - `customer` integer
  - `cash_return` object
    - `received` integer
    - `returned` integer
  - `basket_items` object[]
    - `course` integer
    - `discount_reason_id` integer
    - `menu` integer
    - `product` integer
    - `product_variance` integer
    - `name` string
    - `discount_type` 0 | 1 — 0 - percentage discount 1 - amount discount
    - `discount` integer — amount of discount when discount type is percentage discount [0]
    - `discount_margin` integer — amount of discount when discount type is amount discount [1]
    - `selling_price` integer
    - `amount` integer
    - `quantity` integer
    - `comment` string
    - `code` string
    - `text` string
    - `gift_coupon` integer
    - `item_hash` string
    - `customer_name` string
    - `customer_mail` string
    - `tax_type` integer
  - `basket_types` object[]
    - `type` integer
    - `amount` integer
    - `code` string
    - `frame_text` string
    - `card_data` string
    - `cash_return` integer
    - `currency_exchange_rate` integer
    - `total_in_custom_currency` integer
  - `name` string

## Response `201`

Created

- EBasket
  - `uid` integer
  - `crdate` integer
  - `tstamp` integer
  - `crdate_formatted` string
  - `tstamp_formatted` string
  - `type` integer
  - `type_text` string
  - `total_amount` integer
  - `client` integer
  - `discount` integer
  - `disount_type` string
  - `discount_reason_id` integer
  - `customer` integer
  - `account` integer
  - `canceled` integer
  - `canceled_formatted` string
  - `branch` integer
  - `cash_register` integer
  - `table` integer
  - `total_stock_amount` integer
  - `total_no_tax` integer
  - `card_data` object
  - `status` object
  - `canceled_note` object
  - `deleted_note` string
  - `order_hash` string
  - `order_id` integer
  - `sequence_number` integer
  - `frame_text` string
  - `canceled_frame_text` string
  - `cash_return` object
  - `terminal_type` integer
  - `sales` integer
  - `fiscal_data` object
  - `copied_formatted` string
  - `parent` integer
  - `total_no_discount` integer
  - `discount_margin` integer
  - `warning` string
  - `extra_amount` integer
  - `tips` integer
  - `is_cancelable` boolean
  - `return_reason` integer
  - `currency_exchange_rate` integer
  - `total_in_custom_currency` integer
  - `currency_symbol` string
  - `currency_letters` string
  - `currency_icon_number` integer
  - `mobile_payment` object
    - `provider` integer
    - `transaction_id` integer
  - `external_id` integer
  - `card_type` string
  - `is_external_request` boolean
  - `name` string — name for the basket
  - `basket_items` BasketItem[]
    - `uid` integer
    - `crdate` integer
    - `tstamp` integer
    - `crdate_formatted` string
    - `tstamp_formatted` string
  - `basket_types` BasketType[]
    - `uid` integer
    - `crdate` integer
    - `tstamp` integer
    - `crdate_formatted` string
    - `tstamp_formatted` string
  - `coupon0` GiftCoupon
    - `uid` integer
    - `crdate` integer
    - `tstamp` integer
    - `crdate_formatted` string
    - `tstamp_formatted` string
    - `code` string
    - `initial_amount` integer
    - `current_amount` integer
    - `active` integer
    - `expired` boolean
    - `exhausted` boolean
    - `activated_by` integer
    - `client` integer
    - `cash_register` integer
    - `type` integer
    - `type_text` string
    - `payment_type` integer
    - `voucher_number` integer
    - `external_number` integer
    - `activated_time` string
    - `expiry_date` string
    - `comment` string
    - `change_message` string
    - `customer_id` integer
  - `tax_data` object[]
    - `vat_type` integer
    - `total_tax` number
  - `invoice0` Invoice
    - `uid` integer
    - `crdate` integer
    - `tstamp` integer
    - `crdate_formatted` string
    - `tstamp_formatted` string
    - `basket` integer
    - `due_date` string
    - `comment` string
    - `reference_no` string
  - `account0` Account
    - `uid` integer
    - `crdate` integer
    - `tstamp` integer
    - `crdate_formatted` string
    - `tstamp_formatted` string
    - `username` string
    - `first_name` string
    - `middle_name` string
    - `last_name` string
    - `title` string
    - `verified_time` integer
    - `hidden_account` integer
    - `mobile` string
    - `full_name` string
    - `lang` string
  - `customer0` Customer
    - `uid` integer
    - `crdate` integer
    - `tstamp` integer
    - `crdate_formatted` string
    - `tstamp_formatted` string
    - `name` string
    - `mail` string
    - `phone` string
    - `prefix_country_id` integer
    - `client` integer
    - `address` integer
    - `address_text` string
    - `vat_no` string
    - `account_type` integer
    - `type` integer
    - `custom_number` string
    - `comment` string
    - `subscribed` integer
    - `discount_group_tags` object
    - `customer_number` string
    - `extend_integration` IntegrationCustomers
      - `uid` integer
      - `crdate` integer
      - `tstamp` integer
      - `crdate_formatted` string
      - `tstamp_formatted` string
      - `customer_id` integer
      - `type` integer
      - `credit_limit` integer
      - `integrationNumber` string
    - `address0` Address
      - `uid` integer
      - `crdate` integer
      - `tstamp` integer
      - `crdate_formatted` string
      - `tstamp_formatted` string
      - `street_name` string
      - `map_lat` number
      - `map_long` number
      - `country` integer
      - `zip_code` string
      - `note` string
      - `city_name` string
      - `cc_name` string
      - `name` string
    - `discount_group` DiscountGroup
      - `uid` integer
      - `crdate` integer
      - `tstamp` integer
      - `crdate_formatted` string
      - `tstamp_formatted` string
      - `name` string
      - `discount` number
      - `discount_on_children` integer
  - `discount_reason0` DiscountReason
    - `uid` integer
    - `crdate` integer
    - `tstamp` integer
    - `crdate_formatted` string
    - `tstamp_formatted` string
    - `name` string
    - `client` integer
  - `takeaway_order0` TakeawayOrder
    - `uid` integer
    - `crdate` integer
    - `tstamp` integer
    - `crdate_formatted` string
    - `tstamp_formatted` string

---

[API](https://skmtc.dev/shopbox/apis/shopbox-api.md) · [All operations](https://skmtc.dev/shopbox/apis/shopbox-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/shopbox/shopbox-api/revisions/f1847469718c/schema)
