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

# Reject

> Only `new` orders that are not yet paid. A paid order gets `409 order_paid` - call XFaster support, which handles the refund. Don't reject because the kitchen is full; pause new orders instead.



## OpenAPI

````yaml POST /orders/{id}/reject
openapi: 3.1.0
info:
  title: XFaster Partner API
  version: '1.0'
  description: >
    Receive XFaster orders in your POS, send their status back, and keep the
    menu, stock and prices in sync.

    One API key per store, or one integrator key for all your stores (it names
    the store in X-XFaster-Store). Money is in agorot (integers, VAT included).
    Times are ISO 8601 with the Israel offset.
servers:
  - url: https://staging2.xfaster.net/api/partner/v1
    description: Sandbox (test keys, xfp_test_…)
  - url: https://apps.xfaster.net/api/partner/v1
    description: Live (live keys, xfp_live_…)
security:
  - apiKey: []
  - apiKey: []
    storeHeader: []
tags:
  - name: Store
  - name: Orders
  - name: Menu
  - name: Market
  - name: Reports
  - name: Sandbox
paths:
  /orders/{id}/reject:
    post:
      tags:
        - Orders
      summary: Reject an order
      description: >-
        Only `new` orders that are not yet paid. A paid order gets `409
        order_paid` - call XFaster support, which handles the refund. Don't
        reject because the kitchen is full; pause new orders instead.
      operationId: rejectOrder
      parameters:
        - $ref: '#/components/parameters/OrderId'
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - reason
              properties:
                reason:
                  type: string
                  enum:
                    - item_unavailable
                    - too_busy
                    - closing_soon
                    - cannot_deliver_address
                    - other
                note:
                  type: string
                  maxLength: 200
                  example: אין לחמניות
      responses:
        '200':
          $ref: '#/components/responses/OrderOk'
        '403':
          description: XFaster does not let stores cancel (reject_not_allowed)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          $ref: '#/components/responses/Conflict'
components:
  parameters:
    OrderId:
      name: id
      in: path
      required: true
      schema:
        type: integer
        example: 183761
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      description: >-
        Any unique string. Repeating a request with the same key within 24 hours
        returns the first answer instead of acting twice.
      schema:
        type: string
        example: 5f0c3d1e-8b6a-4e1f-9c2d-7a1b0e4f6d21
  responses:
    OrderOk:
      description: The order after the change
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Order'
          examples:
            example:
              $ref: '#/components/examples/Order'
    Conflict:
      description: >-
        The order's status doesn't allow it. details.status holds the current
        status.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: invalid_status
              message: The order is preparing.
              details:
                status: preparing
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            details:
              type:
                - object
                - 'null'
    Order:
      type: object
      properties:
        id:
          type: integer
          example: 183761
        number:
          type: string
          example: '183761'
        type:
          type: string
          enum:
            - delivery
            - pickup
        status:
          $ref: '#/components/schemas/OrderStatus'
        placed_at:
          type: string
          format: date-time
        scheduled_for:
          type:
            - string
            - 'null'
          format: date-time
          description: Set for orders placed for later
        prep_time_minutes:
          type:
            - integer
            - 'null'
        ready_by:
          type:
            - string
            - 'null'
          format: date-time
        customer:
          type: object
          properties:
            name:
              type: string
              example: Rami K.
            phone:
              type: string
              example: '+972501234567'
        delivery:
          type:
            - object
            - 'null'
          properties:
            by:
              type: string
              enum:
                - xfaster
                - store
            address:
              type:
                - object
                - 'null'
              description: Only when the store delivers itself
        items:
          type: array
          items:
            $ref: '#/components/schemas/OrderLine'
        notes:
          type: object
          properties:
            customer:
              type:
                - string
                - 'null'
              example: בלי בצל
            if_unavailable:
              type:
                - string
                - 'null'
            cutlery:
              type: boolean
        totals:
          type: object
          description: items + packaging + delivery_fee + tip - discount - coupon = total
          properties:
            items:
              type: integer
              example: 13000
            discount:
              type: integer
              example: 0
            coupon:
              type: integer
              example: 0
            packaging:
              type: integer
              example: 0
            delivery_fee:
              type: integer
              example: 1600
              description: The courier's and XFaster's, not the store's
            tip:
              type: integer
              example: 0
            total:
              type: integer
              example: 14600
            currency:
              type: string
              example: ILS
        payment:
          type: object
          properties:
            method:
              type: string
              enum:
                - cash
                - card
                - wallet
                - partial
                - offline
            status:
              type: string
              enum:
                - unpaid
                - paid
                - partially_paid
            store_collects:
              type: integer
              description: Cash your cashier takes (cash pickup orders only)
              agorot: null
        invoice:
          type: object
          properties:
            issued_by:
              type: string
              enum:
                - xfaster
                - store
              description: >-
                xfaster: record as an outside payment, no receipt, keep out of
                your fiscal Z
        picking:
          type:
            - string
            - 'null'
          enum:
            - picking
            - done
            - null
          description: Markets - lines are final once done
        cancellation:
          type:
            - object
            - 'null'
          properties:
            by:
              type: string
              enum:
                - store
                - customer
                - xfaster
            reason:
              type:
                - string
                - 'null'
        updated_at:
          type: string
          format: date-time
    OrderStatus:
      type: string
      enum:
        - new
        - preparing
        - ready
        - picked_up
        - delivered
        - collected
        - cancelled
    OrderLine:
      type: object
      properties:
        line_id:
          type: integer
          example: 991201
        item_id:
          type:
            - integer
            - 'null'
          example: 3062
        external_id:
          type:
            - string
            - 'null'
          example: BURG-SMASH
        name:
          type: string
          example: סמאש בורגר
        quantity:
          type: integer
          example: 2
        unit_price:
          type: integer
          example: 6000
          description: Includes the chosen options
        barcode:
          type:
            - string
            - 'null'
        unit:
          type:
            - string
            - 'null'
          example: ק״ג
        by_weight:
          type: boolean
        total:
          type: integer
          example: 13000
        choices:
          type: array
          items:
            type: object
            properties:
              group:
                type:
                  - string
                  - 'null'
                example: מידת עשייה
              option:
                type: string
                example: מדיום
              price:
                type: integer
                example: 0
        addons:
          type: array
          items:
            type: object
            properties:
              addon_id:
                type: integer
                example: 412
              external_id:
                type:
                  - string
                  - 'null'
              name:
                type: string
                example: צ׳דר
              quantity:
                type: integer
                example: 1
              price:
                type: integer
                example: 500
        components:
          type: array
          description: What is inside a deal or a pizza, ready to print
          items:
            type: object
            properties:
              title:
                type: string
                example: בורגר 1
              quantity:
                type: integer
              lines:
                type: array
                items:
                  type: string
        note:
          type:
            - string
            - 'null'
  examples:
    Order:
      value:
        id: 183761
        number: '183761'
        type: delivery
        status: preparing
        placed_at: '2026-10-14T19:30:00+03:00'
        scheduled_for: null
        prep_time_minutes: 25
        ready_by: '2026-10-14T19:56:00+03:00'
        customer:
          name: Rami K.
          phone: '+972501234567'
        delivery:
          by: xfaster
          address: null
        items:
          - line_id: 991201
            item_id: 3062
            external_id: BURG-SMASH
            name: סמאש בורגר
            quantity: 2
            unit_price: 6000
            barcode: null
            unit: null
            by_weight: false
            total: 13000
            choices:
              - group: מידת עשייה
                option: מדיום
                price: 0
            addons:
              - addon_id: 412
                external_id: ADD-CHEDDAR
                name: צ׳דר
                quantity: 1
                price: 500
            components: []
            note: null
        notes:
          customer: בלי בצל
          if_unavailable: null
          cutlery: false
        totals:
          items: 13000
          discount: 0
          coupon: 0
          packaging: 0
          delivery_fee: 1600
          tip: 0
          total: 14600
          currency: ILS
        payment:
          method: cash
          status: unpaid
          store_collects: 0
        invoice:
          issued_by: xfaster
        picking: null
        cancellation: null
        updated_at: '2026-10-14T19:31:04+03:00'
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: >-
        The store's API key (xfp_test_… on the sandbox, xfp_live_… on live).
        XFaster creates it and shows it once. An integrator key (one key for a
        POS company) also sends X-XFaster-Store.
    storeHeader:
      type: apiKey
      in: header
      name: X-XFaster-Store
      description: >-
        Integrator keys only: the XFaster store id this request is for. It must
        be linked to your key (else 403 store_not_linked); without it 400
        store_header_required. Store keys don't send it.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.