> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mannco.store/llms.txt
> Use this file to discover all available pages before exploring further.

# Bulk create/update/remove buy orders

> Processes up to 100 buy orders in a single request. For each entry, a new buy order is inserted, an existing one is updated, or it is removed when both `value` and `amount` are `0`. Each entry is validated independently, so the response can report partial success with a mix of processed entries and errors.

**Permission:** Connected + API. **Rate limit:** 1 request per 5 seconds per API key.



## OpenAPI

````yaml /openapi.json post /item/buyorder/bulk
openapi: 3.1.0
info:
  title: Mannco.store API
  description: >-
    Complete API documentation for Mannco.store - Buy and sell TF2, CS:GO, Dota
    2, Rust and Steam community items. All routes use the `api` filter. Every
    endpoint requires an `Authorization: Bearer <jwt>` token obtained from POST
    /user/login. The only exception is the login endpoint itself, which is used
    to obtain the token.
  version: 1.0.0
servers:
  - url: https://api.mannco.store
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Auth
    description: Authentication and login
  - name: Items
    description: Item details, listings, pricing, and sales graphs
  - name: Offers
    description: Create, manage, and respond to trade offers
  - name: Buy Orders
    description: Create, update, and manage buy orders
  - name: Payment
    description: Checkout sessions for balance and cart payments
  - name: Inventory
    description: 'Manage user inventory: list, price, and withdraw'
  - name: Cart
    description: Manage the shopping cart
  - name: Listing
    description: Deposit Steam items and instant sell
  - name: Trading
    description: Active and historical trades
  - name: User Account
    description: Account, balance, sessions, and history
paths:
  /item/buyorder/bulk:
    post:
      tags:
        - Buy Orders
      summary: Bulk create/update/remove buy orders
      description: >-
        Processes up to 100 buy orders in a single request. For each entry, a
        new buy order is inserted, an existing one is updated, or it is removed
        when both `value` and `amount` are `0`. Each entry is validated
        independently, so the response can report partial success with a mix of
        processed entries and errors.


        **Permission:** Connected + API. **Rate limit:** 1 request per 5 seconds
        per API key.
      operationId: bulkBuyOrders
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - orders
              properties:
                orders:
                  type: array
                  description: List of buy orders to process (maximum 100)
                  maxItems: 100
                  items:
                    type: object
                    required:
                      - itemid
                      - value
                      - amount
                    properties:
                      itemid:
                        type: integer
                        description: Item ID (positive)
                      value:
                        type: integer
                        description: >-
                          Buy order price in cents (positive). Set to 0 together
                          with amount 0 to remove the existing buy order.
                      amount:
                        type: integer
                        description: >-
                          Number of items to buy (max 5000 per item). Set to 0
                          together with value 0 to remove the existing buy
                          order.
            example:
              orders:
                - itemid: 123
                  value: 50
                  amount: 2
                - itemid: 456
                  value: 10
                  amount: 5
                - itemid: 321
                  value: 0
                  amount: 0
                - itemid: 654
                  value: 0
                  amount: 0
                - itemid: 789
                  value: 100
                  amount: 1
                - itemid: 999
                  value: 30
                  amount: 1
                - itemid: 111
                  value: -5
                  amount: 3
                - itemid: 222
                  value: 20
                  amount: 9000
                - itemid: 0
                  value: 10
                  amount: 1
      responses:
        '200':
          description: Bulk buy orders processed
          content:
            application/json:
              example:
                err: false
                success: true
                content:
                  total: 9
                  processed: 3
                  errors: 6
                  results:
                    - itemid: 123
                      status: inserted
                      message: Inserted
                    - itemid: 456
                      status: updated
                      message: Buy order updated
                    - itemid: 321
                      status: removed
                      message: Removed
                    - itemid: 654
                      status: error
                      message: No buy order found
                    - itemid: 789
                      status: error
                      message: >-
                        There is already an item on sale at this price or
                        cheaper, please buy it directly!
                    - itemid: 999
                      status: error
                      message: Not enough balance
                    - itemid: 111
                      status: error
                      message: Value must be a positive number
                    - itemid: 222
                      status: error
                      message: Max 5000 items
                    - itemid: 0
                      status: error
                      message: Itemid must be a positive number
              schema:
                $ref: '#/components/schemas/ApiError'
        '300':
          $ref: '#/components/responses/BusinessError'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  schemas:
    ApiError:
      type: object
      description: >-
        Standard Mannco.store response envelope. `err` and `success` flag the
        outcome; the payload (or error message) is always under `content`.
      required:
        - err
        - success
      properties:
        err:
          type: boolean
          description: True when the request failed.
        success:
          type: boolean
          description: True when the request succeeded.
        content:
          description: Payload on success, or an error message/object on failure.
  responses:
    BusinessError:
      description: >-
        Business error. The request was understood but rejected by domain rules
        (HTTP 300).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          example:
            err: true
            success: false
            content: Error message
    Forbidden:
      description: >-
        Forbidden. Missing/invalid JWT, blocked country, or insufficient
        permissions.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          example:
            err: true
            success: false
            content: forbidden
    RateLimited:
      description: Rate limit exceeded.
      headers:
        X-RateLimit-Limit:
          description: Request quota for the window.
          schema:
            type: integer
        X-RateLimit-Remaining:
          description: Remaining requests in the window.
          schema:
            type: integer
        X-RateLimit-Reset:
          description: Unix time when the window resets.
          schema:
            type: integer
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          example:
            err: true
            success: false
            content: Rate limit exceeded. Retry after 60 seconds.
    ServerError:
      description: Internal server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          example:
            err: true
            success: false
            content: Internal server error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT obtained from POST /user/login

````