swagger: '2.0'
info:
  title: Gift Cards APIs v1
  version: 1.0.0
  description: >-
    Use these APIs to manage information about gift cards for users.


    ## Authentication


    To consume TS APIs you will have to contact to TS Gift Card support. Where you will request for APIs credentials. After successfull acceptance of request you will receive APIs credentials which will contain email and password and TS Gift Card server url.


    ### How to use these credentials to consume APIs


    To consume **TS Gift Card APIs** you will have to append **ts_server_url** to each API end point along with email and password receive from TS Gift Card support team in request headers.
paths:
  /api/v1/clients/create_or_update_client:
    post:
      responses:
        "200":
          description: OK
          schema:
            type: object
            properties:
              message:
                type: string
            example:
              message: Client has been created successfully.
          examples:
            application/json:
              message: "Client has been created successfully."
      summary: Create or Update a Client.
      operationId: Create or Update Client
      description: >-
        This endpoint can be used to create or update TS client.
      tags:
        - Clients
      parameters:
        - in: body
          name: request
          description: Payload to create/update a client
          required: true
          schema:
            $ref: '#/definitions/ClientCreateRequest'  

  /api/v1/clients/fast_track_record:
    get:
      responses:
        "200":
          description: OK
          schema:
            type: object
            properties:
              success:
                type: boolean
              store:
                type: object
                properties:
                  id:
                    type: number
                  name:
                    type: string
                  code:
                    type: string
                  url:
                    type: string
                  client_id:
                    type: number
                  created_at:
                    type: string
                  updated_at:
                    type: string
                  fx_fees:
                    type: number
                    format: float
                    description: "can be null"
                  fx_label:
                    type: string
                    description: "can be null"
                  fx_enable:
                    type: boolean
                  monetary_campaign_id:
                    type: integer
                    description: "can be null"
                  store_front_link:
                    type: string
                    description: "can be null"
                  soft_delete:
                    type: boolean
                  activation_payment_link:
                    type: string
                    description: "can be null"
                  top_up_payment_link:
                    type: string
                    description: "can be null"
                  max_value:
                    type: number
                    format: float
                    description: "can be null"
                  min_value:
                    type: number
                    format: float
                    description: "can be null"
                  gift_card_values:
                    type: string
                    description: "can be null"
            example:
              success: true
              store:
                id: 329
                name: T1
                code: T1
                url: ""
                client_id: 192
                created_at: 2024-08-15T17:34:19.907Z
                updated_at: 2024-08-15T17:34:19.907Z
                fx_fees: null
                fx_label: null
                fx_enable: false
                monetary_campaign_id: null
                store_front_link: null
                soft_delete: false
                activation_payment_link: null
                top_up_payment_link: null
                max_value: null
                min_value: null
                gift_card_values: null
          examples:
            response:
              value:
                success: true
                store:
                  id: 329
                  name: T1
                  code: T1
                  url: ""
                  client_id: 192
                  created_at: 2024-08-15T17:34:19.907Z
                  updated_at: 2024-08-15T17:34:19.907Z
                  fx_fees: null
                  fx_label: null
                  fx_enable: false
                  monetary_campaign_id: null
                  store_front_link: null
                  soft_delete: false
                  activation_payment_link: null
                  top_up_payment_link: null
                  max_value: null
                  min_value: null
                  gift_card_values: null
      summary: Create a Client and associated records for fast track signup.
      operationId: Fast Track Record
      description: |-
          This endpoint can be used to make fast track record.
      tags:
        - Clients
      parameters:
        - name: store_name
          in: query
          description: Store name.
          required: true
          type: string
        - name: ts_client_user_email
          in: query
          description: TS client email.
          required: true
          type: string
        - name: ts_api_user_email
          in: query
          description: TS API User email.
          required: true
          type: string
  /api/v1/clients/dashboard_report:
    get:
      responses:
        "200":
          description: OK
          schema:
            type: object
            properties:
              labels:
                type: array
                items:
                  type: string
              gift_card_values:
                type: array
                items:
                  type: number
              transactions_values:
                type: array
                items:
                  type: number
            example:
              labels:
                - 05 Jun
                - 04 Jun
              gift_card_values:
                - 72
              transactions_values:
                - -1355
                - 60
          examples:
            response:
              value:
                labels:
                  - 05 Jun
                  - 04 Jun
                gift_card_values:
                  - 72
                transactions_values:
                  - -1355
                  - 60
      summary: Generate a dashboard report for Client.
      operationId: Get Dashboard Report
      description: |-
        This endpoint can be used to Get dashboard report.

      tags:
        - Clients
      parameters:
        - name: start_date
          in: query
          description: Start Date.
          required: true
          type: number
        - name: end_date
          in: query
          description: End Date.
          required: true
          type: number
      security:
        - basic: []
  /api/v1/clients/download_report:
    get:
      responses:
        "200":
          description: OK
          schema:
            type: array
            items:
              type: object
              properties:
                number:
                  type: string
                serial_number:
                  type: string
                created_at:
                  type: string
                type:
                  type: string
                delivery_type:
                  type: string
                updated_at:
                  type: string
                valid:
                  type: string
                status:
                  type: string
                recipient_first_name:
                  type: string
                recipient_last_name:
                  type: string
                recipient_email:
                  type: string
                recipient_phone_number:
                  type: string
                  description: "can be null"
                order_number:
                  type: string
                original_balance:
                  type: string
                current_balance:
                  type: number
                pending_liability:
                  type: number
                campaign_code:
                  type: string
                stores:
                  type: string
                  description: "can be null"
                campaign_stores:
                  type: string
                creator_email:
                  type: string
                creator_role:
                  type: string
                message:
                  type: string
            example:
              - number: "420646903701023412"
                serial_number: "01023412"
                created_at: 13 Aug 24
                type: monetary
                delivery_type: physical
                updated_at: 07:10:34 AM - 13 Aug 24
                valid: 14 Oct 25
                status: active
                recipient_first_name: mehran
                recipient_last_name: javid
                recipient_email: ""
                recipient_phone_number: null
                order_number: "897703402801023370"
                original_balance: "10.0"
                current_balance: 10
                pending_liability: 10
                campaign_code: dev-1
                stores: null
                campaign_stores: Ahsan, Winifred Hickman, qwer, devtransaction store, testing,
                  testing, dev Front Desk, Muhammad Mehran Javid, Monetary
                  (Ifrah), Monetary (Ifrah), Monetary (Ifrah), Monetary
                  (Ifrah), wyfosy243234234kyp test, wyfosy243234234kyp test,
                  wyfosy243234234kyp test, dev-store-1
                creator_email: navisi9055@secbuf.com
                creator_role: admin
                message: ""
          examples:
            response:
              value:
                - number: "420646903701023412"
                  serial_number: "01023412"
                  created_at: 13 Aug 24
                  type: monetary
                  delivery_type: physical
                  updated_at: 07:10:34 AM - 13 Aug 24
                  valid: 14 Oct 25
                  status: active
                  recipient_first_name: mehran
                  recipient_last_name: javid
                  recipient_email: ""
                  recipient_phone_number: null
                  order_number: "897703402801023370"
                  original_balance: "10.0"
                  current_balance: 10
                  pending_liability: 10
                  campaign_code: dev-1
                  stores: null
                  campaign_stores: Ahsan, Winifred Hickman, qwer, devtransaction store, testing,
                    testing, dev Front Desk, Muhammad Mehran Javid, Monetary
                    (Ifrah), Monetary (Ifrah), Monetary (Ifrah), Monetary
                    (Ifrah), wyfosy243234234kyp test, wyfosy243234234kyp
                    test, wyfosy243234234kyp test, dev-store-1
                  creator_email: navisi9055@secbuf.com
                  creator_role: admin
                  message: ""
      summary: Generate a gift card report for Client.
      operationId: Download GiftCard Report
      description: >-
        This endpoint can be used to Download Giftcard Report.

      tags:
        - Clients
      parameters:
        - name: q
          in: query
          description: >-
            Filters for the query.

          required: false
          type: string
        - name: page
          in: query
          description: The page number to retrieve. Default is `1`.
          required: false
          type: number
        - name: per_page
          in: query
          description: The number of results per page. Default is `25`.
          required: false
          type: number
      security:
        - basic: []
  /api/v1/clients/transactions_report:
    get:
      responses:
        "200":
          description: OK
          schema:
            type: object
            properties:
              transactions:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: number
                    amount:
                      type: string
                    currency:
                      type: string
                    transaction_type:
                      type: string
                    ip:
                      type: string
                    note:
                      type: string
                    refund_id:
                      type: integer
                      description: "can be null"
                    gift_card_id:
                      type: number
                    user_id:
                      type: number
                    sku:
                      type: string
                    created_at:
                      type: string
                    updated_at:
                      type: string
                    refunded:
                      type: boolean
                    external_invoice_id:
                      type: string
                    notes:
                      type: string
                    card_balance:
                      type: string
                    store_id:
                      type: number
                    meta:
                      type: object
                      description: "can be null"
                    transaction_reason_id:
                      type: number
                    select_payment_methods:
                      type: integer
                      description: "can be null"
                    operator_id:
                      type: integer
                      description: "can be null"
                    gift_card_status:
                      type: string
                    recipient_emails:
                      type: string
                    service_fee_id:
                      type: integer
                      description: "can be null"
                    gift_card_balance_status:
                      type: string
                      description: "can be null"
                    gift_card:
                      type: object
                      properties:
                        id:
                          type: number
                        number:
                          type: string
                        pin:
                          type: string
                        currency:
                          type: string
                        card_type:
                          type: string
                        expiry_date:
                          type: string
                        value:
                          type: string
                        skus:
                          type: array
                          items: {}
                        status:
                          type: string
                        user_id:
                          type: number
                        campaign_id:
                          type: number
                        created_at:
                          type: string
                        updated_at:
                          type: string
                        client_id:
                          type: number
                        product_name:
                          type: string
                        delivery_mode:
                          type: string
                        delivery_status:
                          type: string
                        is_redeemed:
                          type: boolean
                        is_expired:
                          type: boolean
                        recipient_first_name:
                          type: string
                        recipient_last_name:
                          type: string
                        recipient_email:
                          type: string
                        order_number:
                          type: string
                        send_email:
                          type: boolean
                        order_pay_load:
                          type: string
                        notes:
                          type: string
                        invoice_id:
                          type: string
                        from_address:
                          type: string
                        store_name:
                          type: string
                          description: "can be null"
                        customer_email:
                          type: string
                          description: "can be null"
                        barcode_key:
                          type: string
                        qrcode_key:
                          type: string
                        spree_ts_giftcard_id:
                          type: integer
                          description: "can be null"
                        slug:
                          type: string
                        receipient_phone_number:
                          type: string
                          description: "can be null"
                        send_gift_card_via:
                          type: string
                        bonus:
                          type: boolean
                        serial_number:
                          type: string
                        operator_id:
                          type: integer
                          description: "can be null"
                        customer_id:
                          type: integer
                          description: "can be null"
                        recipient_emails:
                          type: string
                        store_id:
                          type: number
                        generated_at:
                          type: string
                          description: "can be null"
                        import_by:
                          type: string
                        transition_activation_date:
                          type: string
                        message:
                          type: string
                        order_placed_date:
                          type: string
                          description: "can be null"
                        line_item_id:
                          type: integer
                          description: "can be null"
                        start_date:
                          type: string
                          description: "can be null"
                        test_mode:
                          type: boolean
                        request_id:
                          type: integer
                          description: "can be null"
                        balance:
                          type: string
                    transaction_amount:
                      type: string
                    campaign:
                      type: object
                      properties:
                        id:
                          type: number
                        name:
                          type: string
                        start_date:
                          type: string
                        end_date:
                          type: string
                        client_id:
                          type: number
                        code:
                          type: string
                        max_expiry_days:
                          type: integer
                          description: "can be null"
                        created_at:
                          type: string
                        updated_at:
                          type: string
                        date_specific_expiry:
                          type: boolean
                        email_subject:
                          type: string
                        email_html:
                          type: string
                        specific_date:
                          type: string
                        body:
                          type: string
                        sms_html:
                          type: string
                        allow_password:
                          type: boolean
                        ses_from_email:
                          type: string
                        transaction_email_subject:
                          type: string
                        transaction_email_html:
                          type: string
                        soft_delete:
                          type: boolean
                        cc_transaction_email:
                          type: string
                        remain_active:
                          type: boolean
                        is_campaign_remained_active:
                          type: boolean
                        is_gift_card_remained_active:
                          type: boolean
                        transaction_email_receivers:
                          type: string
                        test_mode:
                          type: boolean
                    stores:
                      type: string
                    redemption_store:
                      type: string
                    transaction_reason:
                      type: object
                      properties:
                        id:
                          type: number
                        transaction_reason:
                          type: string
                        transaction_type:
                          type: string
                        client_id:
                          type: number
                        created_at:
                          type: string
                        updated_at:
                          type: string
                        soft_delete:
                          type: boolean
                        store_id:
                          type: integer
                          description: "can be null"
                    creator_email:
                      type: string
                    creator_role:
                      type: string
              count:
                type: number
            example:
              transactions:
                - id: 30321
                  amount: "10.0"
                  currency: AED
                  transaction_type: credit
                  ip: ::1
                  note: ""
                  refund_id: null
                  gift_card_id: 28070
                  user_id: 24
                  sku: "[]"
                  created_at: 2024-08-13T07:10:35.868Z
                  updated_at: 2024-08-13T07:10:35.868Z
                  refunded: false
                  external_invoice_id: "897703402801023400"
                  notes: "897703402801023370"
                  card_balance: "10.0"
                  store_id: 227
                  meta: null
                  transaction_reason_id: 1328
                  select_payment_methods: null
                  operator_id: null
                  gift_card_status: active
                  recipient_emails: ""
                  service_fee_id: null
                  gift_card_balance_status: null
                  gift_card:
                    id: 28070
                    number: "420646903701023412"
                    pin: "17123"
                    currency: AED
                    card_type: monetary
                    expiry_date: 2025-10-14T00:00:00.000Z
                    value: "10.0"
                    skus: []
                    status: active
                    user_id: 24
                    campaign_id: 61
                    created_at: 2024-08-13T07:10:33.979Z
                    updated_at: 2024-08-13T07:10:34.047Z
                    client_id: 3
                    product_name: Gift Card
                    delivery_mode: physical
                    delivery_status: pickUp
                    is_redeemed: false
                    is_expired: false
                    recipient_first_name: mehran
                    recipient_last_name: javid
                    recipient_email: ""
                    order_number: "897703402801023370"
                    send_email: false
                    order_pay_load: ""
                    notes: "897703402801023370"
                    invoice_id: "897703402801023400"
                    from_address: ""
                    store_name: null
                    customer_email: null
                    barcode_key: tFy383IBzMdLsgA6
                    qrcode_key: YGnTWj5Gh6h4XkEf
                    spree_ts_giftcard_id: null
                    slug: ee96012c-5f0d-4951-a37b-499d2a3ee407
                    receipient_phone_number: null
                    send_gift_card_via: email
                    bonus: false
                    serial_number: "01023412"
                    operator_id: null
                    customer_id: null
                    recipient_emails: ayesha@plerosys.com
                    store_id: 227
                    generated_at: null
                    import_by: ts_giftcards
                    transition_activation_date: 2024-08-13T07:10:33.979Z
                    message: ""
                    order_placed_date: null
                    line_item_id: null
                    start_date: null
                    test_mode: false
                    request_id: null
                    balance: "10.0"
                  transaction_amount: "10.0"
                  campaign:
                    id: 61
                    name: dev-1
                    start_date: 2023-01-27T00:00:00.000Z
                    end_date: 2026-12-27T00:00:00.000Z
                    client_id: 3
                    code: dev-1
                    max_expiry_days: null
                    created_at: 2023-01-27T09:20:56.836Z
                    updated_at: 2024-08-13T11:32:17.940Z
                    date_specific_expiry: true
                    email_subject: dev testing email template merhan
                    email_html: dev testing email template merhan
                    specific_date: 2025-10-14T00:00:00.000Z
                    body: dev testing message body
                    sms_html: dev testing sms template
                    allow_password: false
                    ses_from_email: user@email.com
                    transaction_email_subject: dev testing transaction email bisma
                    transaction_email_html: >-2
                       {{#if trasaction.show_local_amount}}
                            {{trasaction.local_currency}} {{trasaction.local_amount}}
                        {{/if}}
                    soft_delete: false
                    cc_transaction_email: user@email.com
                    remain_active: false
                    is_campaign_remained_active: false
                    is_gift_card_remained_active: false
                    transaction_email_receivers: ""
                    test_mode: false
                  stores: Ahsan, Winifred Hickman, qwer, devtransaction store, testing, testing,
                    dev Front Desk, Muhammad Mehran Javid, Monetary (Ifrah),
                    Monetary (Ifrah), Monetary (Ifrah), Monetary (Ifrah),
                    wyfosy243234234kyp test, wyfosy243234234kyp test,
                    wyfosy243234234kyp test, dev-store-1
                  redemption_store: Ahsan
                  transaction_reason:
                    id: 1328
                    transaction_reason: Active
                    transaction_type: credit
                    client_id: 3
                    created_at: 2024-05-12T06:13:52.890Z
                    updated_at: 2024-05-12T06:13:52.890Z
                    soft_delete: false
                    store_id: null
                  creator_email: navisi9055@secbuf.com
                  creator_role: admin
              count: 1
          examples:
            response:
              value:
                transactions:
                  - id: 30321
                    amount: "10.0"
                    currency: AED
                    transaction_type: credit
                    ip: ::1
                    note: ""
                    refund_id: null
                    gift_card_id: 28070
                    user_id: 24
                    sku: "[]"
                    created_at: 2024-08-13T07:10:35.868Z
                    updated_at: 2024-08-13T07:10:35.868Z
                    refunded: false
                    external_invoice_id: "897703402801023400"
                    notes: "897703402801023370"
                    card_balance: "10.0"
                    store_id: 227
                    meta: null
                    transaction_reason_id: 1328
                    select_payment_methods: null
                    operator_id: null
                    gift_card_status: active
                    recipient_emails: ""
                    service_fee_id: null
                    gift_card_balance_status: null
                    gift_card:
                      id: 28070
                      number: "420646903701023412"
                      pin: "17123"
                      currency: AED
                      card_type: monetary
                      expiry_date: 2025-10-14T00:00:00.000Z
                      value: "10.0"
                      skus: []
                      status: active
                      user_id: 24
                      campaign_id: 61
                      created_at: 2024-08-13T07:10:33.979Z
                      updated_at: 2024-08-13T07:10:34.047Z
                      client_id: 3
                      product_name: Gift Card
                      delivery_mode: physical
                      delivery_status: pickUp
                      is_redeemed: false
                      is_expired: false
                      recipient_first_name: mehran
                      recipient_last_name: javid
                      recipient_email: ""
                      order_number: "897703402801023370"
                      send_email: false
                      order_pay_load: ""
                      notes: "897703402801023370"
                      invoice_id: "897703402801023400"
                      from_address: ""
                      store_name: null
                      customer_email: null
                      barcode_key: tFy383IBzMdLsgA6
                      qrcode_key: YGnTWj5Gh6h4XkEf
                      spree_ts_giftcard_id: null
                      slug: ee96012c-5f0d-4951-a37b-499d2a3ee407
                      receipient_phone_number: null
                      send_gift_card_via: email
                      bonus: false
                      serial_number: "01023412"
                      operator_id: null
                      customer_id: null
                      recipient_emails: ayesha@plerosys.com
                      store_id: 227
                      generated_at: null
                      import_by: ts_giftcards
                      transition_activation_date: 2024-08-13T07:10:33.979Z
                      message: ""
                      order_placed_date: null
                      line_item_id: null
                      start_date: null
                      test_mode: false
                      request_id: null
                      balance: "10.0"
                    transaction_amount: "10.0"
                    campaign:
                      id: 61
                      name: dev-1
                      start_date: 2023-01-27T00:00:00.000Z
                      end_date: 2026-12-27T00:00:00.000Z
                      client_id: 3
                      code: dev-1
                      max_expiry_days: null
                      created_at: 2023-01-27T09:20:56.836Z
                      updated_at: 2024-08-13T11:32:17.940Z
                      date_specific_expiry: true
                      email_subject: dev testing email template merhan
                      email_html: dev testing email template merhan
                      specific_date: 2025-10-14T00:00:00.000Z
                      body: dev testing message body
                      sms_html: dev testing sms template
                      allow_password: false
                      ses_from_email: user@email.com
                      transaction_email_subject: dev testing transaction email bisma
                      transaction_email_html: >-2
                         {{#if trasaction.show_local_amount}}
                              {{trasaction.local_currency}} {{trasaction.local_amount}}
                          {{/if}}
                      soft_delete: false
                      cc_transaction_email: user@email.com
                      remain_active: false
                      is_campaign_remained_active: false
                      is_gift_card_remained_active: false
                      transaction_email_receivers: ""
                      test_mode: false
                    stores: Ahsan, Winifred Hickman, qwer, devtransaction store, testing, testing,
                      dev Front Desk, Muhammad Mehran Javid, Monetary
                      (Ifrah), Monetary (Ifrah), Monetary (Ifrah), Monetary
                      (Ifrah), wyfosy243234234kyp test, wyfosy243234234kyp
                      test, wyfosy243234234kyp test, dev-store-1
                    redemption_store: Ahsan
                    transaction_reason:
                      id: 1328
                      transaction_reason: Active
                      transaction_type: credit
                      client_id: 3
                      created_at: 2024-05-12T06:13:52.890Z
                      updated_at: 2024-05-12T06:13:52.890Z
                      soft_delete: false
                      store_id: null
                    creator_email: navisi9055@secbuf.com
                    creator_role: admin
                count: 1
      summary: Genarate a Transaction Report for Gift Cards.
      operationId: GiftCard Transaction Report
      description: >-
        This endpoint can be used to get Giftcard Transaction Report.

      tags:
        - Clients
      security:
        - basic: []
  /api/v1/clients/liabilities_report:
    get:
      responses:
        "200":
          description: OK
          schema:
            type: object
            properties:
              gift_cards:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: number
                    number:
                      type: string
                    pin:
                      type: string
                    currency:
                      type: string
                    card_type:
                      type: string
                    expiry_date:
                      type: string
                    value:
                      type: string
                    skus:
                      type: array
                      items: {}
                    status:
                      type: string
                    user_id:
                      type: number
                    campaign_id:
                      type: number
                    created_at:
                      type: string
                    updated_at:
                      type: string
                    client_id:
                      type: number
                    product_name:
                      type: string
                    delivery_mode:
                      type: string
                    delivery_status:
                      type: string
                    is_redeemed:
                      type: boolean
                    is_expired:
                      type: boolean
                    recipient_first_name:
                      type: string
                    recipient_last_name:
                      type: string
                    recipient_email:
                      type: string
                    order_number:
                      type: string
                    send_email:
                      type: boolean
                    order_pay_load:
                      type: string
                    notes:
                      type: string
                    invoice_id:
                      type: string
                    from_address:
                      type: string
                    store_name:
                      type: string
                      description: "can be null"
                    customer_email:
                      type: string
                      description: "can be null"
                    barcode_key:
                      type: string
                    qrcode_key:
                      type: string
                    spree_ts_giftcard_id:
                      type: integer
                      description: "can be null"
                    slug:
                      type: string
                    receipient_phone_number:
                      type: string
                      description: "can be null"
                    send_gift_card_via:
                      type: string
                    bonus:
                      type: boolean
                    serial_number:
                      type: string
                    operator_id:
                      type: integer
                      description: "can be null"
                    customer_id:
                      type: integer
                      description: "can be null"
                    recipient_emails:
                      type: string
                    store_id:
                      type: number
                    generated_at:
                      type: string
                      description: "can be null"
                    import_by:
                      type: string
                    transition_activation_date:
                      type: string
                    message:
                      type: string
                    order_placed_date:
                      type: string
                      format: date-time
                      description: "can be null"
                    line_item_id:
                      type: integer
                      description: "can be null"
                    start_date:
                      type: string
                      format: date-time
                      description: "can be null"
                    test_mode:
                      type: boolean
                    request_id:
                      type: integer
                      description: "can be null"
                    campaign_code:
                      type: string
                    campaign_stores:
                      type: string
                    stores:
                      type: string
                      description: "can be null"
                    liability_date:
                      type: string
                    liability:
                      type: string
                    current_balance:
                      type: number
                    creator_email:
                      type: string
                    creator_role:
                      type: string
              total_count:
                type: number
            example:
              gift_cards:
                - id: 28070
                  number: "420646903701023412"
                  pin: "17123"
                  currency: AED
                  card_type: monetary
                  expiry_date: 2025-10-14T00:00:00.000Z
                  value: "10.0"
                  skus: []
                  status: active
                  user_id: 24
                  campaign_id: 61
                  created_at: 2024-08-13T07:10:33.979Z
                  updated_at: 2024-08-13T07:10:34.047Z
                  client_id: 3
                  product_name: Gift Card
                  delivery_mode: physical
                  delivery_status: pickUp
                  is_redeemed: false
                  is_expired: false
                  recipient_first_name: mehran
                  recipient_last_name: javid
                  recipient_email: ""
                  order_number: "897703402801023370"
                  send_email: false
                  order_pay_load: ""
                  notes: "897703402801023370"
                  invoice_id: "897703402801023400"
                  from_address: ""
                  store_name: null
                  customer_email: null
                  barcode_key: tFy383IBzMdLsgA6
                  qrcode_key: YGnTWj5Gh6h4XkEf
                  spree_ts_giftcard_id: null
                  slug: ee96012c-5f0d-4951-a37b-499d2a3ee407
                  receipient_phone_number: null
                  send_gift_card_via: email
                  bonus: false
                  serial_number: "01023412"
                  operator_id: null
                  customer_id: null
                  recipient_emails: ayesha@plerosys.com
                  store_id: 227
                  generated_at: null
                  import_by: ts_giftcards
                  transition_activation_date: 2024-08-13T07:10:33.979Z
                  message: ""
                  order_placed_date: null
                  line_item_id: null
                  start_date: null
                  test_mode: false
                  request_id: null
                  campaign_code: dev-1
                  campaign_stores: Ahsan, Winifred Hickman, qwer, devtransaction store, testing,
                    testing, dev Front Desk, Muhammad Mehran Javid, Monetary
                    (Ifrah), Monetary (Ifrah), Monetary (Ifrah), Monetary
                    (Ifrah), wyfosy243234234kyp test, wyfosy243234234kyp
                    test, wyfosy243234234kyp test, dev-store-1
                  stores: null
                  liability_date: 2024-08-15T11:14:48.986+05:00
                  liability: "10.0"
                  current_balance: 10
                  creator_email: navisi9055@secbuf.com
                  creator_role: admin
              total_count: 1
          examples:
            response:
              value:
                gift_cards:
                  - id: 28070
                    number: "420646903701023412"
                    pin: "17123"
                    currency: AED
                    card_type: monetary
                    expiry_date: 2025-10-14T00:00:00.000Z
                    value: "10.0"
                    skus: []
                    status: active
                    user_id: 24
                    campaign_id: 61
                    created_at: 2024-08-13T07:10:33.979Z
                    updated_at: 2024-08-13T07:10:34.047Z
                    client_id: 3
                    product_name: Gift Card
                    delivery_mode: physical
                    delivery_status: pickUp
                    is_redeemed: false
                    is_expired: false
                    recipient_first_name: mehran
                    recipient_last_name: javid
                    recipient_email: ""
                    order_number: "897703402801023370"
                    send_email: false
                    order_pay_load: ""
                    notes: "897703402801023370"
                    invoice_id: "897703402801023400"
                    from_address: ""
                    store_name: null
                    customer_email: null
                    barcode_key: tFy383IBzMdLsgA6
                    qrcode_key: YGnTWj5Gh6h4XkEf
                    spree_ts_giftcard_id: null
                    slug: ee96012c-5f0d-4951-a37b-499d2a3ee407
                    receipient_phone_number: null
                    send_gift_card_via: email
                    bonus: false
                    serial_number: "01023412"
                    operator_id: null
                    customer_id: null
                    recipient_emails: ayesha@plerosys.com
                    store_id: 227
                    generated_at: null
                    import_by: ts_giftcards
                    transition_activation_date: 2024-08-13T07:10:33.979Z
                    message: ""
                    order_placed_date: null
                    line_item_id: null
                    start_date: null
                    test_mode: false
                    request_id: null
                    campaign_code: dev-1
                    campaign_stores: Ahsan, Winifred Hickman, qwer, devtransaction store, testing,
                      testing, dev Front Desk, Muhammad Mehran Javid,
                      Monetary (Ifrah), Monetary (Ifrah), Monetary (Ifrah),
                      Monetary (Ifrah), wyfosy243234234kyp test,
                      wyfosy243234234kyp test, wyfosy243234234kyp test,
                      dev-store-1
                    stores: null
                    liability_date: 2024-08-15T11:14:48.986+05:00
                    liability: "10.0"
                    current_balance: 10
                    creator_email: navisi9055@secbuf.com
                    creator_role: admin
                total_count: 1
      summary: Generate a Liability Report for Gift Cards.
      operationId: GiftCard Liability Report
      description: >-
        This endpoint can be used to get Giftcard Liability Report.
      tags:
        - Clients
      security:
        - basic: []
  /api/v1/campaigns:
    get:
      responses:
        "200":
          description: OK
          schema:
            type: object
            properties:
              campaigns:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: number
                    name:
                      type: string
                    start_date:
                      type: string
                    end_date:
                      type: string
                    client_id:
                      type: number
                    code:
                      type: string
                    max_expiry_days:
                      type: number
                    created_at:
                      type: string
                    updated_at:
                      type: string
                    date_specific_expiry:
                      type: boolean
                    email_subject:
                      type: string
                    email_html:
                      type: string
                    specific_date:
                      type: string
                      format: date-time
                      description: "can be null"
                    body:
                      type: string
                    sms_html:
                      type: string
                    allow_password:
                      type: boolean
                    ses_from_email:
                      type: string
                    transaction_email_subject:
                      type: string
                    transaction_email_html:
                      type: string
                    soft_delete:
                      type: boolean
                    cc_transaction_email:
                      type: string
                    remain_active:
                      type: boolean
                    is_campaign_remained_active:
                      type: boolean
                    is_gift_card_remained_active:
                      type: boolean
                    transaction_email_receivers:
                      type: string
                    test_mode:
                      type: boolean
              total_count:
                type: number
            example:
              campaigns:
                - id: 370
                  name: dsa
                  start_date: 2024-04-23T00:00:00.000Z
                  end_date: 2025-05-15T00:00:00.000Z
                  client_id: 3
                  code: dsa-1
                  max_expiry_days: 1
                  created_at: 2024-04-23T07:12:20.258Z
                  updated_at: 2024-06-20T14:25:39.226Z
                  date_specific_expiry: false
                  email_subject: abcs@tecsdfdhsembly.com
                  email_html: <h1> hello world </h1>
                  specific_date: null
                  body: ""
                  sms_html: ""
                  allow_password: false
                  ses_from_email: user@email.com
                  transaction_email_subject: user@email.com
                  transaction_email_html: asd
                  soft_delete: false
                  cc_transaction_email: user@email.com
                  remain_active: false
                  is_campaign_remained_active: false
                  is_gift_card_remained_active: false
                  transaction_email_receivers: ""
                  test_mode: false
              total_count: 1
          examples:
            response:
              value:
                campaigns:
                  - id: 370
                    name: dsa
                    start_date: 2024-04-23T00:00:00.000Z
                    end_date: 2025-05-15T00:00:00.000Z
                    client_id: 3
                    code: dsa-1
                    max_expiry_days: 1
                    created_at: 2024-04-23T07:12:20.258Z
                    updated_at: 2024-06-20T14:25:39.226Z
                    date_specific_expiry: false
                    email_subject: abcs@tecsdfdhsembly.com
                    email_html: <h1> hello world </h1>
                    specific_date: null
                    body: ""
                    sms_html: ""
                    allow_password: false
                    ses_from_email: user@email.com
                    transaction_email_subject: user@email.com
                    transaction_email_html: asd
                    soft_delete: false
                    cc_transaction_email: user@email.com
                    remain_active: false
                    is_campaign_remained_active: false
                    is_gift_card_remained_active: false
                    transaction_email_receivers: ""
                    test_mode: false
                total_count: 1
      summary: Retrieve a list of all campaigns associated with current signed in user.
      operationId: List All Campaign Of User
      description: |-
        Get all campaigns associated with a user.
      tags:
        - Campaigns
      parameters:
        - name: q
          in: query
          description: >-
            Filters for the query.

          required: false
          type: string
        - name: page
          in: query
          description: The page number to retrieve. Default is `1`.
          required: false
          type: number
        - name: per_page
          in: query
          description: The number of results per page. Default is `25`.
          required: false
          type: number
      security:
        - basic: []
    post:
      responses:
        "201":
          description: Created
          schema:
            type: object
            properties:
              id:
                type: number
              name:
                type: string
              start_date:
                type: string
              end_date:
                type: string
              client_id:
                type: number
              code:
                type: string
              max_expiry_days:
                type: integer
                description: "can be null"
              created_at:
                type: string
              updated_at:
                type: string
              date_specific_expiry:
                type: boolean
              email_subject:
                type: string
              email_html:
                type: string
              specific_date:
                type: string
              body:
                type: string
              sms_html:
                type: string
              allow_password:
                type: boolean
              ses_from_email:
                type: string
              transaction_email_subject:
                type: string
              transaction_email_html:
                type: string
              soft_delete:
                type: boolean
              cc_transaction_email:
                type: string
              remain_active:
                type: boolean
              is_campaign_remained_active:
                type: boolean
              is_gift_card_remained_active:
                type: boolean
              transaction_email_receivers:
                type: string
              test_mode:
                type: boolean
            example:
              id: 371
              name: new campaign
              start_date: 2024-08-18T00:00:00.000Z
              end_date: 2024-08-31T00:00:00.000Z
              client_id: 3
              code: new_camp1
              max_expiry_days: null
              created_at: 2024-08-18T17:04:19.919Z
              updated_at: 2024-08-18T17:04:19.919Z
              date_specific_expiry: true
              email_subject: campaign email subject
              email_html: campaign email template
              specific_date: 2024-08-31T00:00:00.000Z
              body: ""
              sms_html: ""
              allow_password: true
              ses_from_email: user@email.com
              transaction_email_subject: user@email.com
              transaction_email_html: Transaction Email Template
              soft_delete: false
              cc_transaction_email: user@email.com
              remain_active: false
              is_campaign_remained_active: false
              is_gift_card_remained_active: false
              transaction_email_receivers: ""
              test_mode: true
          examples:
            response:
              value:
                id: 371
                name: new campaign
                start_date: 2024-08-18T00:00:00.000Z
                end_date: 2024-08-31T00:00:00.000Z
                client_id: 3
                code: new_camp1
                max_expiry_days: null
                created_at: 2024-08-18T17:04:19.919Z
                updated_at: 2024-08-18T17:04:19.919Z
                date_specific_expiry: true
                email_subject: campaign email subject
                email_html: campaign email template
                specific_date: 2024-08-31T00:00:00.000Z
                body: ""
                sms_html: ""
                allow_password: true
                ses_from_email: user@email.com
                transaction_email_subject: user@email.com
                transaction_email_html: Transaction Email Template
                soft_delete: false
                cc_transaction_email: user@email.com
                remain_active: false
                is_campaign_remained_active: false
                is_gift_card_remained_active: false
                transaction_email_receivers: ""
                test_mode: true
      summary: Create a new Campaign.
      operationId: Create Campaign
      description: >-
          This API can be used to create a new campaign.

      tags:
        - Campaigns
      parameters:
        - in: body
          name: request
          required: true
          schema:
            $ref: '#/definitions/CampaignCreateRequest'
      security:
        - basic: []
  "/api/v1/campaigns/{campaign_id}":
    get:
      responses:
        "201":
          description: Created
          schema:
            type: object
            properties:
              id:
                type: number
              name:
                type: string
              start_date:
                type: string
              end_date:
                type: string
              client_id:
                type: number
              code:
                type: string
              max_expiry_days:
                type: integer
                description: "can be null"
              created_at:
                type: string
              updated_at:
                type: string
              date_specific_expiry:
                type: boolean
              email_subject:
                type: string
              email_html:
                type: string
              specific_date:
                type: string
              body:
                type: string
              sms_html:
                type: string
              allow_password:
                type: boolean
              ses_from_email:
                type: string
              transaction_email_subject:
                type: string
              transaction_email_html:
                type: string
              soft_delete:
                type: boolean
              cc_transaction_email:
                type: string
              remain_active:
                type: boolean
              is_campaign_remained_active:
                type: boolean
              is_gift_card_remained_active:
                type: boolean
              transaction_email_receivers:
                type: string
              test_mode:
                type: boolean
              store_ids:
                type: array
                items:
                  type: string
              attachment_url:
                type: string
            example:
              id: 371
              name: new campaign
              start_date: 2024-08-18T00:00:00.000Z
              end_date: 2024-08-31T00:00:00.000Z
              client_id: 3
              code: new_camp1
              max_expiry_days: null
              created_at: 2024-08-18T17:04:19.919Z
              updated_at: 2024-08-18T17:04:19.919Z
              date_specific_expiry: true
              email_subject: campaign email subject
              email_html: campaign email template
              specific_date: 2024-08-31T00:00:00.000Z
              body: ""
              sms_html: ""
              allow_password: true
              ses_from_email: user@email.com
              transaction_email_subject: user@email.com
              transaction_email_html: Transaction Email Template
              soft_delete: false
              cc_transaction_email: user@email.com
              remain_active: false
              is_campaign_remained_active: false
              is_gift_card_remained_active: false
              transaction_email_receivers: ""
              test_mode: true
              store_ids:
                - "14"
                - "11"
              attachment_url: ""
          examples:
            response:
              value:
                id: 371
                name: new campaign
                start_date: 2024-08-18T00:00:00.000Z
                end_date: 2024-08-31T00:00:00.000Z
                client_id: 3
                code: new_camp1
                max_expiry_days: null
                created_at: 2024-08-18T17:04:19.919Z
                updated_at: 2024-08-18T17:04:19.919Z
                date_specific_expiry: true
                email_subject: campaign email subject
                email_html: campaign email template
                specific_date: 2024-08-31T00:00:00.000Z
                body: ""
                sms_html: ""
                allow_password: true
                ses_from_email: user@email.com
                transaction_email_subject: user@email.com
                transaction_email_html: Transaction Email Template
                soft_delete: false
                cc_transaction_email: user@email.com
                remain_active: false
                is_campaign_remained_active: false
                is_gift_card_remained_active: false
                transaction_email_receivers: ""
                test_mode: true
                store_ids:
                  - "14"
                  - "11"
                attachment_url: ""
      summary: Retrieve a specific campaign by providing Campaign ID.
      operationId: Show Campaign
      description: >-
        To show respective information you have to send the get request to gift card server and it will send you reponse containing the following information.

      tags:
        - Campaigns
      parameters:
        - name: campaign_id
          in: path
          description: The unique identifier of the campaign in the URL path.
          required: true
          type: number
      security:
        - basic: []
    put:
      responses:
        "200":
          description: OK
          schema:
            type: object
            properties:
              name:
                type: string
              start_date:
                type: string
              end_date:
                type: string
              code:
                type: string
              max_expiry_days:
                type: integer
                description: "can be null"
              date_specific_expiry:
                type: boolean
              is_gift_card_remained_active:
                type: boolean
              is_campaign_remained_active:
                type: boolean
              email_subject:
                type: string
              email_html:
                type: string
              specific_date:
                type: string
              body:
                type: string
              sms_html:
                type: string
              allow_password:
                type: boolean
              ses_from_email:
                type: string
              transaction_email_subject:
                type: string
              transaction_email_html:
                type: string
              cc_transaction_email:
                type: string
              test_mode:
                type: boolean
              id:
                type: number
              client_id:
                type: number
              created_at:
                type: string
              updated_at:
                type: string
              soft_delete:
                type: boolean
              remain_active:
                type: boolean
              transaction_email_receivers:
                type: string
              attachment_url:
                type: string
            example:
              name: new campaign updated
              start_date: 2024-08-18T00:00:00.000Z
              end_date: 2024-08-31T00:00:00.000Z
              code: new_camp1
              max_expiry_days: null
              date_specific_expiry: true
              is_gift_card_remained_active: false
              is_campaign_remained_active: false
              email_subject: campaign email subject
              email_html: campaign email template
              specific_date: 2024-08-31T00:00:00.000Z
              body: ""
              sms_html: ""
              allow_password: true
              ses_from_email: user@email.com
              transaction_email_subject: user@email.com
              transaction_email_html: Transaction Email Template
              cc_transaction_email: user@email.com
              test_mode: true
              id: 371
              client_id: 3
              created_at: 2024-08-18T17:04:19.919Z
              updated_at: 2024-08-18T20:23:23.812Z
              soft_delete: false
              remain_active: false
              transaction_email_receivers: ""
              attachment_url: ""
          examples:
            response:
              value:
                name: new campaign updated
                start_date: 2024-08-18T00:00:00.000Z
                end_date: 2024-08-31T00:00:00.000Z
                code: new_camp1
                max_expiry_days: null
                date_specific_expiry: true
                is_gift_card_remained_active: false
                is_campaign_remained_active: false
                email_subject: campaign email subject
                email_html: campaign email template
                specific_date: 2024-08-31T00:00:00.000Z
                body: ""
                sms_html: ""
                allow_password: true
                ses_from_email: user@email.com
                transaction_email_subject: user@email.com
                transaction_email_html: Transaction Email Template
                cc_transaction_email: user@email.com
                test_mode: true
                id: 371
                client_id: 3
                created_at: 2024-08-18T17:04:19.919Z
                updated_at: 2024-08-18T20:23:23.812Z
                soft_delete: false
                remain_active: false
                transaction_email_receivers: ""
                attachment_url: ""
      summary: Update information of a specific Campaign by providing a Campaign ID.
      operationId: Update Campaign
      description: >-
        To update the data you have to send the put request on the gift card server having the payload containing the update data information in the json object and once got the success in updating information you will received reponse of the update data object.

      tags:
        - Campaigns
      parameters:
        - name: campaign_id
          in: path
          description: The unique identifier of the campaign in the URL path.
          required: true
          type: number
        
        - in: body
          name: request
          required: true
          description: Update a campaign
          schema:
            $ref: '#/definitions/CampaignCreateRequest'
      
      security:
        - basic: []
    delete:
      responses:
        "200":
          description: OK
          schema:
            type: object
            properties:
              message:
                type: string
            example:
              message: Campaign deleted
          examples:
            application/json:
              message: Campaign deleted
      summary: Delete a specific Campaign by providing a campaign ID.
      operationId: Delete Campaign
      description: >-
        To delete respective record you have to send the DELETE request to gift card server and it will delete respect record from the database.

      tags:
        - Campaigns
      parameters:
        - name: campaign_id
          in: path
          description: The unique identifier of the campaign in the URL path.
          required: true
          type: number
      security:
        - basic: []
  "/api/v1/campaigns/{campaign_id}/get_stores":
    get:
      responses:
        "201":
          description: Created
          schema:
            type: array
            items:
              type: object
              properties:
                id:
                  type: number
                name:
                  type: string
                code:
                  type: string
                url:
                  type: string
                client_id:
                  type: number
                created_at:
                  type: string
                updated_at:
                  type: string
                fx_fees:
                  type: number
                  format: float
                  description: "can be null"
                fx_label:
                  type: string
                fx_enable:
                  type: boolean
                  description: "can be null"
                monetary_campaign_id:
                  type: number
                store_front_link:
                  type: string
                  description: "can be null"
                soft_delete:
                  type: boolean
                activation_payment_link:
                  type: string
                top_up_payment_link:
                  type: string
                max_value:
                  type: number
                  format: float
                  description: "can be null"
                min_value:
                  type: number
                  format: float
                  description: "can be null"
                gift_card_values:
                  type: string
            example:
              - id: 227
                name: Ahsan
                code: ali
                url: ""
                client_id: 3
                created_at: 2024-01-16T09:37:22.940Z
                updated_at: 2024-02-14T10:47:52.262Z
                fx_fees: null
                fx_label: ""
                fx_enable: null
                monetary_campaign_id: 347
                store_front_link: null
                soft_delete: false
                activation_payment_link: https://demo6.techsembly.com/single-client-single-vendor/card_activation?sku=002271
                top_up_payment_link: https://demo6.techsembly.com/single-client-single-vendor/card_activation?sku=002271
                max_value: null
                min_value: null
                gift_card_values: ""
          examples:
            response:
              value:
                - id: 227
                  name: Ahsan
                  code: ali
                  url: ""
                  client_id: 3
                  created_at: 2024-01-16T09:37:22.940Z
                  updated_at: 2024-02-14T10:47:52.262Z
                  fx_fees: null
                  fx_label: ""
                  fx_enable: null
                  monetary_campaign_id: 347
                  store_front_link: null
                  soft_delete: false
                  activation_payment_link: https://demo6.techsembly.com/single-client-single-vendor/card_activation?sku=002271
                  top_up_payment_link: https://demo6.techsembly.com/single-client-single-vendor/card_activation?sku=002271
                  max_value: null
                  min_value: null
                  gift_card_values: ""
      summary: Retrieve a list of all stores associated with specific Campaign by providing a Campaign ID.
      operationId: Get Stores of a Campaign
      description: >-
        To show respective information you have to send the get request to gift card server and it will send you reponse containing the following information.

      tags:
        - Campaigns
      parameters:
        - name: campaign_id
          in: path
          description: The unique identifier of the campaign in the URL path.
          required: true
          type: number
      security:
        - basic: []
  "/api/v1/campaigns/{campaignId}/upload_attachment":
    put:
      responses:
        "200":
          description: OK
          schema:
            type: object
            properties:
              updated_at:
                type: string
              id:
                type: number
              name:
                type: string
              start_date:
                type: string
              end_date:
                type: string
              client_id:
                type: number
              code:
                type: string
              max_expiry_days:
                type: integer
                description: "can be null"
              created_at:
                type: string
              date_specific_expiry:
                type: boolean
              email_subject:
                type: string
              email_html:
                type: string
              specific_date:
                type: string
              body:
                type: string
              sms_html:
                type: string
              allow_password:
                type: boolean
              ses_from_email:
                type: string
              transaction_email_subject:
                type: string
              transaction_email_html:
                type: string
              soft_delete:
                type: boolean
              cc_transaction_email:
                type: string
              remain_active:
                type: boolean
              is_campaign_remained_active:
                type: boolean
              is_gift_card_remained_active:
                type: boolean
              transaction_email_receivers:
                type: string
              test_mode:
                type: boolean
              attachment_url:
                type: string
            example:
              updated_at: 2024-08-13T11:32:17.940Z
              id: 61
              name: dev-1
              start_date: 2023-01-27T00:00:00.000Z
              end_date: 2026-12-27T00:00:00.000Z
              client_id: 3
              code: dev-1
              max_expiry_days: null
              created_at: 2023-01-27T09:20:56.836Z
              date_specific_expiry: true
              email_subject: dev testing email template merhan
              email_html: dev testing email template merhan
              specific_date: 2025-10-14T00:00:00.000Z
              body: dev testing message body
              sms_html: dev testing sms template
              allow_password: false
              ses_from_email: user@email.com
              transaction_email_subject: dev testing transaction email bisma
              transaction_email_html: >-2
                 {{#if trasaction.show_local_amount}}
                      {{trasaction.local_currency}} {{trasaction.local_amount}}
                  {{/if}}
              soft_delete: false
              cc_transaction_email: user@email.com
              remain_active: false
              is_campaign_remained_active: false
              is_gift_card_remained_active: false
              transaction_email_receivers: ""
              test_mode: false
              attachment_url: http://localhost:3000/rails/active_storage/disk/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdDVG9JYTJWNVNTSWhZV3R5WWpZeGRXNXpkall5T1RKa2JqTmlPSEo0WkhJMmJuWmpkZ1k2QmtWVU9oQmthWE53YjNOcGRHbHZia2tpZjJsdWJHbHVaVHNnWm1sc1pXNWhiV1U5SW5CbGVHVnNjeTF6WVdocGJDMTVZV1JoZGkweE1EazFNVE13TURrd0xUSXpPRGczTWpNeUxtcHdaeUk3SUdacGJHVnVZVzFsS2oxVlZFWXRPQ2NuY0dWNFpXeHpMWE5oYUdsc0xYbGhaR0YyTFRFd09UVXhNekF3T1RBdE1qTTRPRGN5TXpJdWFuQm5CanNHVkRvUlkyOXVkR1Z1ZEY5MGVYQmxJZzlwYldGblpTOXFjR1ZuT2hGelpYSjJhV05sWDI1aGJXVTZDbXh2WTJGcyIsImV4cCI6IjIwMjQtMDgtMTNUMTE6Mzc6MTcuOTUzWiIsInB1ciI6ImJsb2Jfa2V5In19--ca887feb580fa443ecf2488a9108d90402340034/pexels-sahil-yadav-1095130090-23887232.jpg
          examples:
            response:
              value:
                updated_at: 2024-08-13T11:32:17.940Z
                id: 61
                name: dev-1
                start_date: 2023-01-27T00:00:00.000Z
                end_date: 2026-12-27T00:00:00.000Z
                client_id: 3
                code: dev-1
                max_expiry_days: null
                created_at: 2023-01-27T09:20:56.836Z
                date_specific_expiry: true
                email_subject: dev testing email template merhan
                email_html: dev testing email template merhan
                specific_date: 2025-10-14T00:00:00.000Z
                body: dev testing message body
                sms_html: dev testing sms template
                allow_password: false
                ses_from_email: user@email.com
                transaction_email_subject: dev testing transaction email bisma
                transaction_email_html: >-2
                   {{#if trasaction.show_local_amount}}
                        {{trasaction.local_currency}} {{trasaction.local_amount}}
                    {{/if}}
                soft_delete: false
                cc_transaction_email: user@email.com
                remain_active: false
                is_campaign_remained_active: false
                is_gift_card_remained_active: false
                transaction_email_receivers: ""
                test_mode: false
                attachment_url: http://localhost:3000/rails/active_storage/disk/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdDVG9JYTJWNVNTSWhZV3R5WWpZeGRXNXpkall5T1RKa2JqTmlPSEo0WkhJMmJuWmpkZ1k2QmtWVU9oQmthWE53YjNOcGRHbHZia2tpZjJsdWJHbHVaVHNnWm1sc1pXNWhiV1U5SW5CbGVHVnNjeTF6WVdocGJDMTVZV1JoZGkweE1EazFNVE13TURrd0xUSXpPRGczTWpNeUxtcHdaeUk3SUdacGJHVnVZVzFsS2oxVlZFWXRPQ2NuY0dWNFpXeHpMWE5oYUdsc0xYbGhaR0YyTFRFd09UVXhNekF3T1RBdE1qTTRPRGN5TXpJdWFuQm5CanNHVkRvUlkyOXVkR1Z1ZEY5MGVYQmxJZzlwYldGblpTOXFjR1ZuT2hGelpYSjJhV05sWDI1aGJXVTZDbXh2WTJGcyIsImV4cCI6IjIwMjQtMDgtMTNUMTE6Mzc6MTcuOTUzWiIsInB1ciI6ImJsb2Jfa2V5In19--ca887feb580fa443ecf2488a9108d90402340034/pexels-sahil-yadav-1095130090-23887232.jpg
      summary: Update attachments for a specific Campaign by providing a Campaign ID.
      operationId: Update attachments to campaigns
      description: >-
        This endpoint can be used to update attachments to campaigns.

      tags:
        - Campaigns
      consumes:
        - multipart/form-data
      parameters:
        - name: campaignId
          in: path
          description: The unique identifier of the campaign in the URL path.
          required: true
          type: number
        - name: id
          in: query
          description: The unique identifier of the campaign as a query parameter. This
            should match the `campaignId`.
          required: true
          type: number
        - name: file
          in: formData
          description: The image file to upload as the campaign attachment.
          required: true
          type: file
      security:
        - basic: []
  /api/v1/gift_cards:
    post:
      responses:
        "200":
          description: OK
          schema:
            type: object
            properties:
              id:
                type: number
              number:
                type: string
              pin:
                type: string
              currency:
                type: string
              card_type:
                type: string
              expiry_date:
                type: string
              value:
                type: string
              skus:
                type: array
                items: {}
              status:
                type: string
              user_id:
                type: number
              campaign_id:
                type: number
              created_at:
                type: string
              updated_at:
                type: string
              client_id:
                type: number
              product_name:
                type: string
              delivery_mode:
                type: string
              delivery_status:
                type: string
              is_redeemed:
                type: boolean
              is_expired:
                type: boolean
              recipient_first_name:
                type: string
              recipient_last_name:
                type: string
              recipient_email:
                type: string
              order_number:
                type: string
              send_email:
                type: boolean
              order_pay_load:
                type: string
              notes:
                type: string
              invoice_id:
                type: string
              from_address:
                type: string
              store_name:
                type: string
                description: "can be null"
              customer_email:
                type: string
                description: "can be null"
              barcode_key:
                type: string
              qrcode_key:
                type: string
              spree_ts_giftcard_id:
                type: integer
                description: "can be null"
              slug:
                type: string
              receipient_phone_number:
                type: string
              send_gift_card_via:
                type: string
              bonus:
                type: boolean
              serial_number:
                type: string
              operator_id:
                type: integer
                description: "can be null"
              customer_id:
                type: integer
                description: "can be null"
              recipient_emails:
                type: string
              store_id:
                type: integer
                description: "can be null"
              generated_at:
                type: string
                format: date-time
                description: "can be null"
              import_by:
                type: string
              transition_activation_date:
                type: string
              message:
                type: string
              order_placed_date:
                type: string
                format: date-time
                description: "can be null"
              line_item_id:
                type: integer
                description: "can be null"
              start_date:
                type: string
                format: date-time
                description: "can be null"
              test_mode:
                type: boolean
              request_id:
                type: string
              campaign_body:
                type: string
              image_url:
                type: string
              valid_from:
                type: string
              email_opt_in:
                type: boolean
              one_time:
                type: boolean
              campaign_response:
                type: object
                properties:
                  id:
                    type: number
                  name:
                    type: string
                  start_date:
                    type: string
                  end_date:
                    type: string
                  client_id:
                    type: number
                  code:
                    type: string
                  max_expiry_days:
                    type: integer
                    description: "can be null"
                  created_at:
                    type: string
                  updated_at:
                    type: string
                  date_specific_expiry:
                    type: boolean
                  email_subject:
                    type: string
                  email_html:
                    type: string
                  specific_date:
                    type: string
                  body:
                    type: string
                  sms_html:
                    type: string
                  allow_password:
                    type: boolean
                  ses_from_email:
                    type: string
                  transaction_email_subject:
                    type: string
                  transaction_email_html:
                    type: string
                  soft_delete:
                    type: boolean
                  cc_transaction_email:
                    type: string
                  remain_active:
                    type: boolean
                  is_campaign_remained_active:
                    type: boolean
                  is_gift_card_remained_active:
                    type: boolean
                  transaction_email_receivers:
                    type: string
                  test_mode:
                    type: boolean
              initial_store_id:
                type: number
            example:
              id: 28071
              number: "935896188801023413"
              pin: "24429"
              currency: USD
              card_type: monetary
              expiry_date: 2025-10-14T00:00:00.000Z
              value: "1000.0"
              skus: []
              status: active
              user_id: 24
              campaign_id: 61
              created_at: 2024-08-18T06:38:49.603Z
              updated_at: 2024-08-18T06:38:49.603Z
              client_id: 3
              product_name: tesitng
              delivery_mode: digital
              delivery_status: delivered
              is_redeemed: false
              is_expired: false
              recipient_first_name: Darrel
              recipient_last_name: Wiggins
              recipient_email: wyfosykyp@mailinator.com
              order_number: ""
              send_email: false
              order_pay_load: ""
              notes: werwe
              invoice_id: sk-123
              from_address: wyfosykyp@mailinator.com
              store_name: null
              customer_email: null
              barcode_key: UT764xIqPatTsAl0
              qrcode_key: ZemSYyRv6OAfQ9H1
              spree_ts_giftcard_id: null
              slug: d4b46bb5-3666-4e54-954b-cae5bad470f0
              receipient_phone_number: ""
              send_gift_card_via: email
              bonus: false
              serial_number: "01023413"
              operator_id: null
              customer_id: null
              recipient_emails: ""
              store_id: null
              generated_at: null
              import_by: ts_giftcards
              transition_activation_date: 2024-08-18T06:38:50.960Z
              message: ""
              order_placed_date: null
              line_item_id: null
              start_date: null
              test_mode: false
              request_id: "1234"
              campaign_body: dev testing message body
              image_url: http://localhost:3000/rails/active_storage/disk/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdDVG9JYTJWNVNTSWhZV3R5WWpZeGRXNXpkall5T1RKa2JqTmlPSEo0WkhJMmJuWmpkZ1k2QmtWVU9oQmthWE53YjNOcGRHbHZia2tpZjJsdWJHbHVaVHNnWm1sc1pXNWhiV1U5SW5CbGVHVnNjeTF6WVdocGJDMTVZV1JoZGkweE1EazFNVE13TURrd0xUSXpPRGczTWpNeUxtcHdaeUk3SUdacGJHVnVZVzFsS2oxVlZFWXRPQ2NuY0dWNFpXeHpMWE5oYUdsc0xYbGhaR0YyTFRFd09UVXhNekF3T1RBdE1qTTRPRGN5TXpJdWFuQm5CanNHVkRvUlkyOXVkR1Z1ZEY5MGVYQmxTU0lQYVcxaFoyVXZhbkJsWndZN0JsUTZFWE5sY25acFkyVmZibUZ0WlRvS2JHOWpZV3c9IiwiZXhwIjoiMjAyNC0wOC0xOFQwNjo0Mzo1MS4xNzZaIiwicHVyIjoiYmxvYl9rZXkifX0=--0d3568f6b231e5bb715426994f1fac2314bc17b8/pexels-sahil-yadav-1095130090-23887232.jpg
              valid_from: 2025-11-18T00:00:00.000Z
              email_opt_in: false
              one_time: false
              campaign_response:
                id: 61
                name: dev-1
                start_date: 2023-01-27T00:00:00.000Z
                end_date: 2026-12-27T00:00:00.000Z
                client_id: 3
                code: dev-1
                max_expiry_days: null
                created_at: 2023-01-27T09:20:56.836Z
                updated_at: 2024-08-13T11:32:17.940Z
                date_specific_expiry: true
                email_subject: dev testing email template merhan
                email_html: dev testing email template merhan
                specific_date: 2025-10-14T00:00:00.000Z
                body: dev testing message body
                sms_html: dev testing sms template
                allow_password: false
                ses_from_email: user@email.com
                transaction_email_subject: dev testing transaction email bisma
                transaction_email_html: >-2
                   {{#if trasaction.show_local_amount}}
                        {{trasaction.local_currency}} {{trasaction.local_amount}}
                    {{/if}}
                soft_delete: false
                cc_transaction_email: user@email.com
                remain_active: false
                is_campaign_remained_active: false
                is_gift_card_remained_active: false
                transaction_email_receivers: ""
                test_mode: false
              initial_store_id: 11
          examples:
            response:
              value:
                id: 28071
                number: "935896188801023413"
                pin: "24429"
                currency: USD
                card_type: monetary
                expiry_date: 2025-10-14T00:00:00.000Z
                value: "1000.0"
                skus: []
                status: active
                user_id: 24
                campaign_id: 61
                created_at: 2024-08-18T06:38:49.603Z
                updated_at: 2024-08-18T06:38:49.603Z
                client_id: 3
                product_name: tesitng
                delivery_mode: digital
                delivery_status: delivered
                is_redeemed: false
                is_expired: false
                recipient_first_name: Darrel
                recipient_last_name: Wiggins
                recipient_email: wyfosykyp@mailinator.com
                order_number: ""
                send_email: false
                order_pay_load: ""
                notes: werwe
                invoice_id: sk-123
                from_address: wyfosykyp@mailinator.com
                store_name: null
                customer_email: null
                barcode_key: UT764xIqPatTsAl0
                qrcode_key: ZemSYyRv6OAfQ9H1
                spree_ts_giftcard_id: null
                slug: d4b46bb5-3666-4e54-954b-cae5bad470f0
                receipient_phone_number: ""
                send_gift_card_via: email
                bonus: false
                serial_number: "01023413"
                operator_id: null
                customer_id: null
                recipient_emails: ""
                store_id: null
                generated_at: null
                import_by: ts_giftcards
                transition_activation_date: 2024-08-18T06:38:50.960Z
                message: ""
                order_placed_date: null
                line_item_id: null
                start_date: null
                test_mode: false
                request_id: "1234"
                campaign_body: dev testing message body
                image_url: http://localhost:3000/rails/active_storage/disk/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdDVG9JYTJWNVNTSWhZV3R5WWpZeGRXNXpkall5T1RKa2JqTmlPSEo0WkhJMmJuWmpkZ1k2QmtWVU9oQmthWE53YjNOcGRHbHZia2tpZjJsdWJHbHVaVHNnWm1sc1pXNWhiV1U5SW5CbGVHVnNjeTF6WVdocGJDMTVZV1JoZGkweE1EazFNVE13TURrd0xUSXpPRGczTWpNeUxtcHdaeUk3SUdacGJHVnVZVzFsS2oxVlZFWXRPQ2NuY0dWNFpXeHpMWE5oYUdsc0xYbGhaR0YyTFRFd09UVXhNekF3T1RBdE1qTTRPRGN5TXpJdWFuQm5CanNHVkRvUlkyOXVkR1Z1ZEY5MGVYQmxTU0lQYVcxaFoyVXZhbkJsWndZN0JsUTZFWE5sY25acFkyVmZibUZ0WlRvS2JHOWpZV3c9IiwiZXhwIjoiMjAyNC0wOC0xOFQwNjo0Mzo1MS4xNzZaIiwicHVyIjoiYmxvYl9rZXkifX0=--0d3568f6b231e5bb715426994f1fac2314bc17b8/pexels-sahil-yadav-1095130090-23887232.jpg
                campaign_response:
                  id: 61
                  name: dev-1
                  start_date: 2023-01-27T00:00:00.000Z
                  end_date: 2026-12-27T00:00:00.000Z
                  client_id: 3
                  code: dev-1
                  max_expiry_days: null
                  created_at: 2023-01-27T09:20:56.836Z
                  updated_at: 2024-08-13T11:32:17.940Z
                  date_specific_expiry: true
                  email_subject: dev testing email template merhan
                  email_html: dev testing email template merhan
                  specific_date: 2025-10-14T00:00:00.000Z
                  body: dev testing message body
                  sms_html: dev testing sms template
                  allow_password: false
                  ses_from_email: user@email.com
                  transaction_email_subject: dev testing transaction email bisma
                  transaction_email_html: >-2
                     {{#if trasaction.show_local_amount}}
                          {{trasaction.local_currency}} {{trasaction.local_amount}}
                      {{/if}}
                  soft_delete: false
                  cc_transaction_email: user@email.com
                  remain_active: false
                  is_campaign_remained_active: false
                  is_gift_card_remained_active: false
                  transaction_email_receivers: ""
                  test_mode: false
                initial_store_id: 11
      summary: Create a New Gift Card.
      operationId: Create a New Gift Card
      description: >-
        Use this API to create a gift card.

      tags:
        - Gift Cards
      parameters:
        - in: body
          name: request
          description: Gift Card creation.
          required: true
          schema:
            $ref: '#/definitions/GiftCardCreateRequest'
      security:
        - basic: []
    get:
      responses:
        "200":
          description: OK
          schema:
            type: object
            properties:
              gift_cards:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: number
                    number:
                      type: string
                    serial_number:
                      type: string
                    created_at:
                      type: string
                    status:
                      type: string
                    expiry_date:
                      type: string
                    product_name:
                      type: string
                    card_type:
                      type: string
                    currency:
                      type: string
                    value:
                      type: string
                    campaign_id:
                      type: number
                    order_number:
                      type: string
                    bonus:
                      type: boolean
                    skus:
                      type: array
                      items: {}
                    store_name:
                      type: string
                      description: "can be null"
                    campaign_code:
                      type: string
                    stores:
                      type: string
                      description: "can be null"
                    campaign_store:
                      type: string
              total_count:
                type: number
            example:
              gift_cards:
                - id: 27985
                  number: "789782926501023327"
                  serial_number: "01023327"
                  created_at: 2024-05-22T09:16:08.590Z
                  status: active
                  expiry_date: 2026-11-27T00:00:00.000Z
                  product_name: "1323123"
                  card_type: monetary
                  currency: AED
                  value: "23.0"
                  campaign_id: 61
                  order_number: ""
                  bonus: false
                  skus: []
                  store_name: null
                  campaign_code: dev-1
                  stores: null
                  campaign_store: Ahsan, Winifred Hickman, qwer, devtransaction store, testing,
                    testing, dev Front Desk, Muhammad Mehran Javid, Monetary
                    (Ifrah), Monetary (Ifrah), Monetary (Ifrah), Monetary
                    (Ifrah), wyfosy243234234kyp test, wyfosy243234234kyp
                    test, wyfosy243234234kyp test, dev-store-1
              total_count: 1
          examples:
            response:
              value:
                gift_cards:
                  - id: 27985
                    number: "789782926501023327"
                    serial_number: "01023327"
                    created_at: 2024-05-22T09:16:08.590Z
                    status: active
                    expiry_date: 2026-11-27T00:00:00.000Z
                    product_name: "1323123"
                    card_type: monetary
                    currency: AED
                    value: "23.0"
                    campaign_id: 61
                    order_number: ""
                    bonus: false
                    skus: []
                    store_name: null
                    campaign_code: dev-1
                    stores: null
                    campaign_store: Ahsan, Winifred Hickman, qwer, devtransaction store, testing,
                      testing, dev Front Desk, Muhammad Mehran Javid,
                      Monetary (Ifrah), Monetary (Ifrah), Monetary (Ifrah),
                      Monetary (Ifrah), wyfosy243234234kyp test,
                      wyfosy243234234kyp test, wyfosy243234234kyp test,
                      dev-store-1
                total_count: 1
      summary: Retrieve a list of GiftCards.
      operationId: Get all GiftCards
      description: >-
        This endpoint can be used to retrieve gift cards collection.

      tags:
        - Gift Cards
      parameters:
        - name: q
          in: query
          description: >-
            Filters for the query.

          required: false
          type: string
        - name: page
          in: query
          description: The page number to retrieve. Default is `1`.
          required: false
          type: number
        - name: per_page
          in: query
          description: The number of results per page. Default is `25`.
          required: false
          type: number
      security:
        - basic: []
  "/api/v1/gift_cards/{gift_card_id}":
    get:
      responses:
        "200":
          description: OK
          schema:
            type: object
            properties:
              gift_card:
                type: object
                properties:
                  id:
                    type: number
                  number:
                    type: string
                  serial_number:
                    type: string
                  created_at:
                    type: string
                  status:
                    type: string
                  expiry_date:
                    type: string
                  product_name:
                    type: string
                  card_type:
                    type: string
                  currency:
                    type: string
                  value:
                    type: string
                  campaign_id:
                    type: number
                  order_number:
                    type: string
                  bonus:
                    type: boolean
                  skus:
                    type: array
                    items: {}
                  delivery_mode:
                    type: string
                  delivery_status:
                    type: string
                  store_name:
                    type: string
                    description: "can be null"
                  message:
                    type: string
              transactions:
                type: array
                items:
                  type: object
                  properties:
                    transaction_type:
                      type: string
                    transaction_reason:
                      type: string
                    id:
                      type: number
                    amount:
                      type: string
                    currency:
                      type: string
                    created_at:
                      type: string
                    refunded:
                      type: boolean
                    transaction_notes:
                      type: string
                    transaction_creator_email:
                      type: string
                    transaction_creator_role:
                      type: string
              current_balance:
                type: string
            example:
              gift_card:
                id: 28071
                number: "935896188801023413"
                serial_number: "01023413"
                created_at: 2024-08-18T06:38:49.603Z
                status: active
                expiry_date: 2025-10-14T00:00:00.000Z
                product_name: tesitng
                card_type: monetary
                currency: USD
                value: "1000.0"
                campaign_id: 61
                order_number: ""
                bonus: false
                skus: []
                delivery_mode: digital
                delivery_status: delivered
                store_name: null
                message: ""
              transactions:
                - transaction_type: credit
                  transaction_reason: Active
                  id: 30322
                  amount: "1000.0"
                  currency: USD
                  created_at: 2024-08-18T06:38:51.072Z
                  refunded: false
                  transaction_notes: werwe
                  transaction_creator_email: dev@tsclient.com
                  transaction_creator_role: "1234"
              current_balance: "1000.00"
          examples:
            response:
              value:
                gift_card:
                  id: 28071
                  number: "935896188801023413"
                  serial_number: "01023413"
                  created_at: 2024-08-18T06:38:49.603Z
                  status: active
                  expiry_date: 2025-10-14T00:00:00.000Z
                  product_name: tesitng
                  card_type: monetary
                  currency: USD
                  value: "1000.0"
                  campaign_id: 61
                  order_number: ""
                  bonus: false
                  skus: []
                  delivery_mode: digital
                  delivery_status: delivered
                  store_name: null
                  message: ""
                transactions:
                  - transaction_type: credit
                    transaction_reason: Active
                    id: 30322
                    amount: "1000.0"
                    currency: USD
                    created_at: 2024-08-18T06:38:51.072Z
                    refunded: false
                    transaction_notes: werwe
                    transaction_creator_email: dev@tsclient.com
                    transaction_creator_role: "1234"
                current_balance: "1000.00"
      summary: "Retrieve a specific Gift Card by providing a Gift Card ID."
      operationId: "Get a Gift Card with Id:"
      description: |-
        Use this API to retrieve the details of a gift card.
      tags:
        - Gift Cards
      parameters:
        - name: gift_card_id
          in: path
          description: The unique identifier of the gift card in the URL path.
          required: true
          type: number
      security:
        - basic: []
    put:
      responses:
        "200":
          description: OK
          schema:
            type: object
            properties:
              status:
                type: string
              value:
                type: string
              id:
                type: number
              number:
                type: string
              currency:
                type: string
              card_type:
                type: string
              expiry_date:
                type: string
                format: date-time
                description: "can be null"
              skus:
                type: array
                items: {}
              user_id:
                type: number
              campaign_id:
                type: number
              created_at:
                type: string
              updated_at:
                type: string
              client_id:
                type: number
              product_name:
                type: string
              delivery_mode:
                type: string
              delivery_status:
                type: string
              is_redeemed:
                type: boolean
              is_expired:
                type: boolean
              recipient_first_name:
                type: string
              recipient_last_name:
                type: string
              recipient_email:
                type: string
              order_number:
                type: string
              send_email:
                type: boolean
              order_pay_load:
                type: string
              notes:
                type: string
              invoice_id:
                type: string
              from_address:
                type: string
              store_name:
                type: string
                description: "can be null"
              customer_email:
                type: string
                description: "can be null"
              barcode_key:
                type: string
              qrcode_key:
                type: string
              spree_ts_giftcard_id:
                type: integer
                description: "can be null"
              slug:
                type: string
              receipient_phone_number:
                type: string
              send_gift_card_via:
                type: string
              bonus:
                type: boolean
              serial_number:
                type: string
              operator_id:
                type: integer
                description: "can be null"
              customer_id:
                type: integer
                description: "can be null"
              recipient_emails:
                type: string
              store_id:
                type: integer
                description: "can be null"
              generated_at:
                type: string
                format: date-time
                description: "can be null"
              import_by:
                type: string
              transition_activation_date:
                type: string
              message:
                type: string
              order_placed_date:
                type: string
                format: date-time
                description: "can be null"
              line_item_id:
                type: integer
                description: "can be null"
              start_date:
                type: string
                format: date-time
                description: "can be null"
              test_mode:
                type: boolean
              request_id:
                type: string
            example:
              status: blocked
              value: "1000.0"
              id: 28071
              number: "935896188801023413"
              currency: USD
              card_type: monetary
              expiry_date: null
              skus: []
              user_id: 24
              campaign_id: 61
              created_at: 2024-08-18T06:38:49.603Z
              updated_at: 2024-08-18T12:41:48.628Z
              client_id: 3
              product_name: tesitng
              delivery_mode: digital
              delivery_status: delivered
              is_redeemed: false
              is_expired: false
              recipient_first_name: Darrel
              recipient_last_name: Wiggins
              recipient_email: wyfosykyp@mailinator.com
              order_number: ""
              send_email: false
              order_pay_load: ""
              notes: werwe
              invoice_id: sk-123
              from_address: wyfosykyp@mailinator.com
              store_name: null
              customer_email: null
              barcode_key: UT764xIqPatTsAl0
              qrcode_key: ZemSYyRv6OAfQ9H1
              spree_ts_giftcard_id: null
              slug: d4b46bb5-3666-4e54-954b-cae5bad470f0
              receipient_phone_number: ""
              send_gift_card_via: email
              bonus: false
              serial_number: "01023413"
              operator_id: null
              customer_id: null
              recipient_emails: ""
              store_id: null
              generated_at: null
              import_by: ts_giftcards
              transition_activation_date: 2024-08-18T06:38:50.960Z
              message: ""
              order_placed_date: null
              line_item_id: null
              start_date: null
              test_mode: false
              request_id: "1234"
          examples:
            response:
              value:
                status: blocked
                value: "1000.0"
                id: 28071
                number: "935896188801023413"
                currency: USD
                card_type: monetary
                expiry_date: null
                skus: []
                user_id: 24
                campaign_id: 61
                created_at: 2024-08-18T06:38:49.603Z
                updated_at: 2024-08-18T12:41:48.628Z
                client_id: 3
                product_name: tesitng
                delivery_mode: digital
                delivery_status: delivered
                is_redeemed: false
                is_expired: false
                recipient_first_name: Darrel
                recipient_last_name: Wiggins
                recipient_email: wyfosykyp@mailinator.com
                order_number: ""
                send_email: false
                order_pay_load: ""
                notes: werwe
                invoice_id: sk-123
                from_address: wyfosykyp@mailinator.com
                store_name: null
                customer_email: null
                barcode_key: UT764xIqPatTsAl0
                qrcode_key: ZemSYyRv6OAfQ9H1
                spree_ts_giftcard_id: null
                slug: d4b46bb5-3666-4e54-954b-cae5bad470f0
                receipient_phone_number: ""
                send_gift_card_via: email
                bonus: false
                serial_number: "01023413"
                operator_id: null
                customer_id: null
                recipient_emails: ""
                store_id: null
                generated_at: null
                import_by: ts_giftcards
                transition_activation_date: 2024-08-18T06:38:50.960Z
                message: ""
                order_placed_date: null
                line_item_id: null
                start_date: null
                test_mode: false
                request_id: "1234"
      summary: Update a specific Gift Card by providing a Gift Card ID.
      operationId: Update a Gift Card with Id
      description: >-
        Use this API to update the details of a gift card. You can update status, expiry and delivery status.

      tags:
        - Gift Cards
      parameters:
        - name: gift_card_id
          in: path
          description: The unique identifier of the gift card in the URL path.
          required: true
          type: number
        - in: body
          name: request
          description: Gift Card update payload
          required: true
          schema:
            $ref: '#/definitions/GiftCardUpdateRequest'  
      security:
        - basic: []
  /api/v1/gift_cards/redeem:
    post:
      responses:
        "200":
          description: OK
          schema:
            type: object
            properties:
              card_number:
                type: string
              amount:
                type: string
              balance:
                type: string
              currency:
                type: string
              id:
                type: number
            example:
              card_number: "791400114701023414"
              amount: Card is redeemed
              balance: ""
              currency: ""
              id: 30327
          examples:
            response:
              value:
                card_number: "791400114701023414"
                amount: Card is redeemed
                balance: ""
                currency: ""
                id: 30327
      summary: Redeem a experiences type Gift Card.
      operationId: Redeem a gift card with card_type experiences
      description: >-
        Use this API to redeem a gift card whose card_type is experiences.

      tags:
        - Gift Cards
      parameters:
        - in: body
          name: request
          description: Redeem experiences gift card
          required: true
          schema:
            $ref: '#/definitions/GiftCardRedeemRequest'
      security:
        - basic: []
  /api/v1/gift_cards/credit:
    post:
      responses:
        "200":
          description: OK
          schema:
            type: object
            properties:
              card_number:
                type: string
              amount:
                type: string
              balance:
                type: string
              currency:
                type: string
              meta:
                type: object
                properties: {}
            example:
              card_number: "8108449962"
              amount: "123123.00"
              balance: "13076531.56"
              currency: USD
              meta: {}
          examples:
            response:
              value:
                card_number: "8108449962"
                amount: "123123.00"
                balance: "13076531.56"
                currency: USD
                meta: {}
      summary: Top up a Gift Card.
      operationId: Top up a gift card
      description: >-
        Use this API to top up your card with given amount and currency.

      tags:
        - Gift Cards
      parameters:
        - in: body
          name: request
          description: Credit a gift card
          required: true
          schema:
            $ref: '#/definitions/GiftCardCreditRequest'
      security:
        - basic: []
  /api/v1/gift_cards/check_balance:
    put:
      responses:
        "200":
          description: OK
          schema:
            type: object
            properties:
              product_name:
                type: string
              card_type:
                type: string
              skus:
                type: string
              card_status:
                type: string
              card_number:
                type: string
              balance:
                type: string
              expiry_date:
                type: string
            example:
              product_name: Gift Card
              card_type: experiences
              skus: sad
              card_status: Valid
              card_number: "791400114701023414"
              balance: Card is redeemable.
              expiry_date: 2025-10-14T00:00:00.000Z
          examples:
            response:
              value:
                product_name: Gift Card
                card_type: experiences
                skus: sad
                card_status: Valid
                card_number: "791400114701023414"
                balance: Card is redeemable.
                expiry_date: 2025-10-14T00:00:00.000Z
      summary: Check balance of a specific Gift Card with card_type experiences.
      operationId: Check balance of a gift card with card_type experiences
      description: >-
        Use this API to check the balance of a gift card with card_type experiences.

      tags:
        - Gift Cards
      parameters:
        - in: body
          name: request
          description: Check balance of a specific gift card
          required: true
          schema:
            $ref: '#/definitions/GiftCardCheckBalance'
      security:
        - basic: []
  /api/v1/gift_cards/assign_to_customer:
    put:
      responses:
        "200":
          description: OK
          schema:
            type: object
            properties:
              message:
                type: string
            example:
              message: Card Added Successfully
          examples:
            response:
              value:
                message: Card Added Successfully
      summary: Assign a specific Gift Card to Customer.
      operationId: Assign Gift Cards to Customer
      description: |-
        This endpoint can be used to assign giftcards to customers.
      tags:
        - Gift Cards
      parameters:
        - in: body
          name: request
          description: Assign gift card to customer
          required: true
          schema:
            $ref: '#/definitions/AssignToCustomer'
      security:
        - basic: []
  /api/v1/gift_cards/remove_card:
    put:
      responses:
        "200":
          description: OK
          schema:
            type: object
            properties:
              message:
                type: string
            example:
              message: Card Removed Successfully
          examples:
            response:
              value:
                message: Card Removed Successfully
      summary: Unassign a specific Gift Card from Customer.
      operationId: Unassign Gift Cards to Customer
      description: |-
        This endpoint can be used to unassign giftcards to customers.

      tags:
        - Gift Cards
      parameters:
        - in: body
          name: request
          description: Unassign gift card from customer
          required: true
          schema:
            $ref: '#/definitions/RemoveCard'
      security:
        - basic: []
  /api/v1/gift_cards/update_status:
    put:
      responses:
        "200":
          description: OK
          schema:
            type: object
            properties:
              status:
                type: string
              value:
                type: string
              id:
                type: number
              number:
                type: string
              pin:
                type: string
              currency:
                type: string
              card_type:
                type: string
              expiry_date:
                type: string
              skus:
                type: array
                items:
                  type: string
              user_id:
                type: number
              campaign_id:
                type: number
              created_at:
                type: string
              updated_at:
                type: string
              client_id:
                type: number
              product_name:
                type: string
              delivery_mode:
                type: string
              delivery_status:
                type: string
              is_redeemed:
                type: boolean
              is_expired:
                type: boolean
              recipient_first_name:
                type: string
              recipient_last_name:
                type: string
              recipient_email:
                type: string
              order_number:
                type: string
              send_email:
                type: boolean
              order_pay_load:
                type: string
              notes:
                type: string
              invoice_id:
                type: string
              from_address:
                type: string
              store_name:
                type: string
                description: "can be null"
              customer_email:
                type: string
                description: "can be null"
              barcode_key:
                type: string
              qrcode_key:
                type: string
              spree_ts_giftcard_id:
                type: integer
                description: "can be null"
              slug:
                type: string
              receipient_phone_number:
                type: string
              send_gift_card_via:
                type: string
              bonus:
                type: boolean
              serial_number:
                type: string
              operator_id:
                type: integer
                description: "can be null"
              customer_id:
                type: number
              recipient_emails:
                type: string
              store_id:
                type: integer
                description: "can be null"
              generated_at:
                type: string
                format: date-time
                description: "can be null"
              import_by:
                type: string
              transition_activation_date:
                type: string
              message:
                type: string
              order_placed_date:
                type: string
                format: date-time
                description: "can be null"
              line_item_id:
                type: integer
                description: "can be null"
              start_date:
                type: string
                format: date-time
                description: "can be null"
              test_mode:
                type: boolean
              request_id:
                type: string
            example:
              status: lost
              value: "123.0"
              id: 28072
              number: "791400114701023414"
              pin: "69337"
              currency: AED
              card_type: experiences
              expiry_date: 2025-10-14T00:00:00.000Z
              skus:
                - sad
              user_id: 24
              campaign_id: 61
              created_at: 2024-08-18T15:25:19.074Z
              updated_at: 2024-08-18T15:44:07.695Z
              client_id: 3
              product_name: Gift Card
              delivery_mode: digital
              delivery_status: delivered
              is_redeemed: false
              is_expired: false
              recipient_first_name: Monetary
              recipient_last_name: (Ifrah)
              recipient_email: user@email.com
              order_number: ""
              send_email: false
              order_pay_load: ""
              notes: ad
              invoice_id: dsa
              from_address: user@email.com
              store_name: null
              customer_email: null
              barcode_key: 3W9WxznsbsiXpkzo
              qrcode_key: KOjnl79OQ8dy1jKW
              spree_ts_giftcard_id: null
              slug: b807ce33-cfe1-4c55-95b5-ff675b5b63d5
              receipient_phone_number: ""
              send_gift_card_via: email
              bonus: false
              serial_number: "01023414"
              operator_id: null
              customer_id: 752
              recipient_emails: ""
              store_id: null
              generated_at: null
              import_by: ts_giftcards
              transition_activation_date: 2024-08-18T15:25:20.266Z
              message: dsa
              order_placed_date: null
              line_item_id: null
              start_date: null
              test_mode: false
              request_id: ""
          examples:
            response:
              value:
                status: lost
                value: "123.0"
                id: 28072
                number: "791400114701023414"
                pin: "69337"
                currency: AED
                card_type: experiences
                expiry_date: 2025-10-14T00:00:00.000Z
                skus:
                  - sad
                user_id: 24
                campaign_id: 61
                created_at: 2024-08-18T15:25:19.074Z
                updated_at: 2024-08-18T15:44:07.695Z
                client_id: 3
                product_name: Gift Card
                delivery_mode: digital
                delivery_status: delivered
                is_redeemed: false
                is_expired: false
                recipient_first_name: Monetary
                recipient_last_name: (Ifrah)
                recipient_email: user@email.com
                order_number: ""
                send_email: false
                order_pay_load: ""
                notes: ad
                invoice_id: dsa
                from_address: user@email.com
                store_name: null
                customer_email: null
                barcode_key: 3W9WxznsbsiXpkzo
                qrcode_key: KOjnl79OQ8dy1jKW
                spree_ts_giftcard_id: null
                slug: b807ce33-cfe1-4c55-95b5-ff675b5b63d5
                receipient_phone_number: ""
                send_gift_card_via: email
                bonus: false
                serial_number: "01023414"
                operator_id: null
                customer_id: 752
                recipient_emails: ""
                store_id: null
                generated_at: null
                import_by: ts_giftcards
                transition_activation_date: 2024-08-18T15:25:20.266Z
                message: dsa
                order_placed_date: null
                line_item_id: null
                start_date: null
                test_mode: false
                request_id: ""
      summary: Update Status of a specific Gift Card.
      operationId: Update GiftCard Status
      description: >-
        This endpoint can be used to update giftcard status.

      tags:
        - Gift Cards
      parameters:
        - in: body
          name: request
          description: Update gift card status
          required: true
          schema:
            $ref: '#/definitions/UpdateStatus'
      security:
        - basic: []
  /api/v1/passwords/generate_reset_password_token:
    post:
      responses:
        "200":
          description: OK
          schema:
            type: object
            properties:
              success:
                type: boolean
            example:
              success: true
          examples:
            response:
              value:
                success: true
      summary: Generate Reset Password Token.
      operationId: Generate Reset Password Token
      description: >-
        This endpoint can be used to generate reset password token for customer.
      tags:
        - Passwords
      parameters:
        - in: body
          name: request
          description: Generate reset password token
          required: true
          schema:
            $ref: '#/definitions/ResetPasswordToken'
      security:
        - basic: []
  /api/v1/passwords:
    post:
      responses:
        "200":
          description: OK
          schema:
            type: object
            properties:
              message:
                type: string
            example:
              message: Password updated successfully
          examples:
            response:
              value:
                message: Password updated successfully
      summary: Reset Password by providing a valid reset password token.
      operationId: Reset Password
      description: |-
        This endpoint can be used to reset password for customer.
      tags:
        - Passwords
      parameters:
        - in: body
          name: request
          description: Reset password
          required: true
          schema:
            $ref: '#/definitions/ResetPassword'
      security:
        - basic: []
  /api/v1/reports/download_report:
    get:
      responses:
        "200":
          description: OK
          schema:
            type: array
            items:
              type: object
              properties:
                id:
                  type: number
                number:
                  type: string
                product_name:
                  type: string
                serial_number:
                  type: string
                currency:
                  type: string
                created_at:
                  type: string
                type:
                  type: string
                delivery_type:
                  type: string
                updated_at:
                  type: string
                valid:
                  type: string
                status:
                  type: string
                recipient_first_name:
                  type: string
                recipient_last_name:
                  type: string
                recipient_email:
                  type: string
                recipient_phone_number:
                  type: string
                  description: "can be null"
                order_number:
                  type: string
                original_balance:
                  type: string
                current_balance:
                  type: string
                pending_liability:
                  type: number
                campaign_code:
                  type: string
                stores:
                  type: string
                  description: "can be null"
                campaign_stores:
                  type: string
                reporting_currency:
                  type: string
                reporting_amount:
                  type: number
                reporting_exchange_rate:
                  type: number
                creator_email:
                  type: string
                creator_role:
                  type: string
                message:
                  type: string
                bonus:
                  type: boolean
            example:
              - id: 28070
                number: "420646903701023412"
                product_name: Gift Card
                serial_number: "01023412"
                currency: AED
                created_at: August 13, 2024 07:10 AM
                type: monetary
                delivery_type: physical
                updated_at: August 13, 2024 07:10 AM
                valid: October 14, 2025 12:00 AM
                status: active
                recipient_first_name: mehran
                recipient_last_name: javid
                recipient_email: ""
                recipient_phone_number: null
                order_number: "897703402801023370"
                original_balance: "10.0"
                current_balance: "10.0"
                pending_liability: 10
                campaign_code: dev-1
                stores: null
                campaign_stores: Ahsan, Winifred Hickman, qwer, devtransaction store, testing,
                  testing, dev Front Desk, Muhammad Mehran Javid, Monetary
                  (Ifrah), Monetary (Ifrah), Monetary (Ifrah), Monetary
                  (Ifrah), wyfosy243234234kyp test, wyfosy243234234kyp test,
                  wyfosy243234234kyp test, dev-store-1
                reporting_currency: USD
                reporting_amount: 2.72
                reporting_exchange_rate: 0.27226
                creator_email: navisi9055@secbuf.com
                creator_role: admin
                message: ""
                bonus: false
          examples:
            response:
              value:
                - id: 28070
                  number: "420646903701023412"
                  product_name: Gift Card
                  serial_number: "01023412"
                  currency: AED
                  created_at: August 13, 2024 07:10 AM
                  type: monetary
                  delivery_type: physical
                  updated_at: August 13, 2024 07:10 AM
                  valid: October 14, 2025 12:00 AM
                  status: active
                  recipient_first_name: mehran
                  recipient_last_name: javid
                  recipient_email: ""
                  recipient_phone_number: null
                  order_number: "897703402801023370"
                  original_balance: "10.0"
                  current_balance: "10.0"
                  pending_liability: 10
                  campaign_code: dev-1
                  stores: null
                  campaign_stores: Ahsan, Winifred Hickman, qwer, devtransaction store, testing,
                    testing, dev Front Desk, Muhammad Mehran Javid, Monetary
                    (Ifrah), Monetary (Ifrah), Monetary (Ifrah), Monetary
                    (Ifrah), wyfosy243234234kyp test, wyfosy243234234kyp
                    test, wyfosy243234234kyp test, dev-store-1
                  reporting_currency: USD
                  reporting_amount: 2.72
                  reporting_exchange_rate: 0.27226
                  creator_email: navisi9055@secbuf.com
                  creator_role: admin
                  message: ""
                  bonus: false
      summary: Generate a report Including PII.
      operationId: Including PII Download Report
      description: >-
        This endpoint can be used to Download Including PII Report.

      tags:
        - Reports
      parameters:
        - name: q
          in: query
          description: >-
            Filters for the report data.
          required: true
          type: string
      security:
        - basic: []
  /api/v1/reports/transactions_report:
    get:
      responses:
        "200":
          description: OK
          schema:
            type: object
            properties:
              transactions:
                type: array
                items:
                  type: object
                  properties:
                    gift_card_number:
                      type: string
                    recipient_email:
                      type: string
                    order_number:
                      type: string
                    serial_number:
                      type: string
                    store_code:
                      type: string
                    store_name:
                      type: array
                      items:
                        type: string
                    currency:
                      type: string
                    amount:
                      type: string
                    transaction_type:
                      type: string
                    store_currency:
                      type: string
                    trans_amount:
                      type: string
                    service_fee:
                      type: string
                    exchange_rate:
                      type: string
                    card_balance:
                      type: string
                    gift_card_status:
                      type: string
                    operator_id:
                      type: integer
                      description: "can be null"
                    operator_name:
                      type: string
                      description: "can be null"
                    department:
                      type: string
                      description: "can be null"
                    delivery_mode:
                      type: string
                    gift_card_type:
                      type: string
                    action_date:
                      type: string
                    action_time:
                      type: string
                    notes:
                      type: string
                    gift_card_store_name:
                      type: string
                    campaign_code:
                      type: string
                    campaign_stores:
                      type: string
                    creator_email:
                      type: string
                    creator_role:
                      type: string
                    message:
                      type: string
              count:
                type: number
            example:
              transactions:
                - gift_card_number: "420646903701023412"
                  recipient_email: ""
                  order_number: "897703402801023370"
                  serial_number: "01023412"
                  store_code: ali
                  store_name:
                    - Ahsan
                    - Winifred Hickman
                    - qwer
                    - devtransaction store
                    - testing
                    - testing
                    - dev Front Desk
                    - Muhammad Mehran Javid
                    - Monetary (Ifrah)
                    - Monetary (Ifrah)
                    - Monetary (Ifrah)
                    - Monetary (Ifrah)
                    - wyfosy243234234kyp test
                    - wyfosy243234234kyp test
                    - wyfosy243234234kyp test
                    - dev-store-1
                  currency: AED
                  amount: "10.0"
                  transaction_type: Active
                  store_currency: AED
                  trans_amount: "10.0"
                  service_fee: ""
                  exchange_rate: ""
                  card_balance: "10.0"
                  gift_card_status: active
                  operator_id: null
                  operator_name: null
                  department: null
                  delivery_mode: physical
                  gift_card_type: monetary
                  action_date: 2024-08-13
                  action_time: 08:10 am
                  notes: "897703402801023370"
                  gift_card_store_name: Ahsan
                  campaign_code: dev-1
                  campaign_stores: Ahsan,Winifred Hickman,qwer,devtransaction
                    store,testing,testing,dev Front Desk,Muhammad Mehran
                    Javid,Monetary (Ifrah),Monetary (Ifrah),Monetary
                    (Ifrah),Monetary (Ifrah),wyfosy243234234kyp
                    test,wyfosy243234234kyp test,wyfosy243234234kyp
                    test,dev-store-1
                  creator_email: navisi9055@secbuf.com
                  creator_role: admin
                  message: ""
              count: 1
          examples:
            response:
              value:
                transactions:
                  - gift_card_number: "420646903701023412"
                    recipient_email: ""
                    order_number: "897703402801023370"
                    serial_number: "01023412"
                    store_code: ali
                    store_name:
                      - Ahsan
                      - Winifred Hickman
                      - qwer
                      - devtransaction store
                      - testing
                      - testing
                      - dev Front Desk
                      - Muhammad Mehran Javid
                      - Monetary (Ifrah)
                      - Monetary (Ifrah)
                      - Monetary (Ifrah)
                      - Monetary (Ifrah)
                      - wyfosy243234234kyp test
                      - wyfosy243234234kyp test
                      - wyfosy243234234kyp test
                      - dev-store-1
                    currency: AED
                    amount: "10.0"
                    transaction_type: Active
                    store_currency: AED
                    trans_amount: "10.0"
                    service_fee: ""
                    exchange_rate: ""
                    card_balance: "10.0"
                    gift_card_status: active
                    operator_id: null
                    operator_name: null
                    department: null
                    delivery_mode: physical
                    gift_card_type: monetary
                    action_date: 2024-08-13
                    action_time: 08:10 am
                    notes: "897703402801023370"
                    gift_card_store_name: Ahsan
                    campaign_code: dev-1
                    campaign_stores: Ahsan,Winifred Hickman,qwer,devtransaction
                      store,testing,testing,dev Front Desk,Muhammad Mehran
                      Javid,Monetary (Ifrah),Monetary (Ifrah),Monetary
                      (Ifrah),Monetary (Ifrah),wyfosy243234234kyp
                      test,wyfosy243234234kyp test,wyfosy243234234kyp
                      test,dev-store-1
                    creator_email: navisi9055@secbuf.com
                    creator_role: admin
                    message: ""
                count: 1
      summary: Generate a transaction report Including PII.
      operationId: Including PII Transaction Report
      description: >-
        This endpoint can be used to get Including PII Transaction Report.
      tags:
        - Reports
      parameters:
        - name: q
          in: query
          description: >-
            Filters for the report data.

          required: true
          type: string
        - name: timezone
          in: query
          description: 'The timezone in which the report should be generated. Example:
            `"Europe/London"`.'
          required: true
          type: string
        - name: exchange_values
          in: query
          description: >-
            An object containing exchange rate information used in the report.
          required: true
          type: string
      security:
        - basic: []
  /api/v1/reports/liabilities_report:
    get:
      responses:
        "200":
          description: OK
          schema:
            type: object
            properties:
              gift_cards:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: number
                    product_name:
                      type: string
                    number:
                      type: string
                    delivery_mode:
                      type: string
                    card_type:
                      type: string
                    created_at_date:
                      type: string
                    liability_date:
                      type: string
                    expiry_date:
                      type: string
                    status:
                      type: string
                    recipient_first_name:
                      type: string
                    recipient_last_name:
                      type: string
                    recipient_email:
                      type: string
                    receipient_phone_number:
                      type: string
                      description: "can be null"
                    serial_number:
                      type: string
                    order_number:
                      type: string
                    value:
                      type: string
                    currency:
                      type: string
                    current_balance:
                      type: string
                    liability:
                      type: string
                    campaign_code:
                      type: string
                    stores:
                      type: string
                      description: "can be null"
                    campaign_stores:
                      type: string
                    creator_email:
                      type: string
                    creator_role:
                      type: string
                    balance:
                      type: string
                    message:
                      type: string
              total_count:
                type: number
            example:
              gift_cards:
                - id: 28070
                  product_name: Gift Card
                  number: "420646903701023412"
                  delivery_mode: physical
                  card_type: monetary
                  created_at_date: August 13, 2024 08:10 AM
                  liability_date: August 15, 2024 09:03 AM
                  expiry_date: October 14, 2025 01:00 AM
                  status: active
                  recipient_first_name: mehran
                  recipient_last_name: javid
                  recipient_email: ""
                  receipient_phone_number: null
                  serial_number: "01023412"
                  order_number: "897703402801023370"
                  value: "10.0"
                  currency: AED
                  current_balance: "10.0"
                  liability: "10.0"
                  campaign_code: dev-1
                  stores: null
                  campaign_stores: Ahsan, Winifred Hickman, qwer, devtransaction store, testing,
                    testing, dev Front Desk, Muhammad Mehran Javid, Monetary
                    (Ifrah), Monetary (Ifrah), Monetary (Ifrah), Monetary
                    (Ifrah), wyfosy243234234kyp test, wyfosy243234234kyp
                    test, wyfosy243234234kyp test, dev-store-1
                  creator_email: navisi9055@secbuf.com
                  creator_role: admin
                  balance: "10.0"
                  message: ""
              total_count: 1
          examples:
            response:
              value:
                gift_cards:
                  - id: 28070
                    product_name: Gift Card
                    number: "420646903701023412"
                    delivery_mode: physical
                    card_type: monetary
                    created_at_date: August 13, 2024 08:10 AM
                    liability_date: August 15, 2024 09:03 AM
                    expiry_date: October 14, 2025 01:00 AM
                    status: active
                    recipient_first_name: mehran
                    recipient_last_name: javid
                    recipient_email: ""
                    receipient_phone_number: null
                    serial_number: "01023412"
                    order_number: "897703402801023370"
                    value: "10.0"
                    currency: AED
                    current_balance: "10.0"
                    liability: "10.0"
                    campaign_code: dev-1
                    stores: null
                    campaign_stores: Ahsan, Winifred Hickman, qwer, devtransaction store, testing,
                      testing, dev Front Desk, Muhammad Mehran Javid,
                      Monetary (Ifrah), Monetary (Ifrah), Monetary (Ifrah),
                      Monetary (Ifrah), wyfosy243234234kyp test,
                      wyfosy243234234kyp test, wyfosy243234234kyp test,
                      dev-store-1
                    creator_email: navisi9055@secbuf.com
                    creator_role: admin
                    balance: "10.0"
                    message: ""
                total_count: 1
      summary: Generate a Liability Report Including PII.
      operationId: Including PII Liability Report
      description: >-
        This endpoint can be used to Download Including PII Report.
      tags:
        - Reports
      parameters:
        - name: q
          in: query
          description: >-
            Object containing Filters for the query.
          required: true
          type: string
          
        - name: timezone
          in: query
          description: timezone.
          required: true
          type: number
          
        - name: page
          in: query
          description: The page number to retrieve.
          required: true
          type: number
          
        - name: per_page
          in: query
          description: The number of results per page.
          required: true
          type: number
          
      security:
        - basic: []
  /api/v1/stores:
    get:
      responses:
        "200":
          description: OK
          schema:
            type: array
            items:
              type: object
              properties:
                id:
                  type: number
                name:
                  type: string
                code:
                  type: string
                url:
                  type: string
                client_id:
                  type: number
                created_at:
                  type: string
                updated_at:
                  type: string
                fx_fees:
                  type: number
                  format: float
                  description: "can be null"
                fx_label:
                  type: string
                fx_enable:
                  type: boolean
                  description: "can be null"
                monetary_campaign_id:
                  type: integer
                  description: "can be null"
                store_front_link:
                  type: string
                  description: "can be null"
                soft_delete:
                  type: boolean
                activation_payment_link:
                  type: string
                top_up_payment_link:
                  type: string
                max_value:
                  type: number
                  format: float
                  description: "can be null"
                min_value:
                  type: number
                  format: float
                  description: "can be null"
                gift_card_values:
                  type: string
            example:
              - id: 326
                name: Monetary (Ifrah)
                code: ali03
                url: ""
                client_id: 3
                created_at: 2024-06-05T12:22:37.998Z
                updated_at: 2024-06-05T12:22:37.998Z
                fx_fees: null
                fx_label: ""
                fx_enable: null
                monetary_campaign_id: null
                store_front_link: null
                soft_delete: false
                activation_payment_link: ""
                top_up_payment_link: ""
                max_value: null
                min_value: null
                gift_card_values: ""
          examples:
            response:
              value:
                - id: 326
                  name: Monetary (Ifrah)
                  code: ali03
                  url: ""
                  client_id: 3
                  created_at: 2024-06-05T12:22:37.998Z
                  updated_at: 2024-06-05T12:22:37.998Z
                  fx_fees: null
                  fx_label: ""
                  fx_enable: null
                  monetary_campaign_id: null
                  store_front_link: null
                  soft_delete: false
                  activation_payment_link: ""
                  top_up_payment_link: ""
                  max_value: null
                  min_value: null
                  gift_card_values: ""
      summary: Retrieve a list of all stores associated with current signed in User.
      operationId: List All Store Of User
      description: >-
        This API can be used to retrieve stores collection.

      tags:
        - Stores
      security:
        - basic: []
    post:
      responses:
        "201":
          description: Created
          schema:
            type: object
            properties:
              id:
                type: number
              name:
                type: string
              code:
                type: string
              url:
                type: string
              client_id:
                type: number
              created_at:
                type: string
              updated_at:
                type: string
              fx_fees:
                type: number
              fx_label:
                type: string
              fx_enable:
                type: boolean
              monetary_campaign_id:
                type: integer
                description: "can be null"
              store_front_link:
                type: string
                description: "can be null"
              soft_delete:
                type: boolean
              activation_payment_link:
                type: string
              top_up_payment_link:
                type: string
              max_value:
                type: number
              min_value:
                type: number
              gift_card_values:
                type: string
            example:
              id: 330
              name: new store
              code: new-store-01
              url: ""
              client_id: 3
              created_at: 2024-08-19T06:38:01.356Z
              updated_at: 2024-08-19T06:38:01.356Z
              fx_fees: 10
              fx_label: exchange fee
              fx_enable: true
              monetary_campaign_id: null
              store_front_link: null
              soft_delete: false
              activation_payment_link: http://localhost:3000/card_activation?sku=005672
              top_up_payment_link: http://localhost:3000/card_topup?sku=005672
              max_value: 100000
              min_value: 1
              gift_card_values: 100,500,1000,10000,100000
          examples:
            response:
              value:
                id: 330
                name: new store
                code: new-store-01
                url: ""
                client_id: 3
                created_at: 2024-08-19T06:38:01.356Z
                updated_at: 2024-08-19T06:38:01.356Z
                fx_fees: 10
                fx_label: exchange fee
                fx_enable: true
                monetary_campaign_id: null
                store_front_link: null
                soft_delete: false
                activation_payment_link: http://localhost:3000/card_activation?sku=005672
                top_up_payment_link: http://localhost:3000/card_topup?sku=005672
                max_value: 100000
                min_value: 1
                gift_card_values: 100,500,1000,10000,100000
      summary: Create a new Store.
      operationId: Create Store
      description: >-
        This API can be used to create a new store.

      tags:
        - Stores
      parameters:
        - in: body
          name: request
          description: Store creation payload
          required: true
          schema:
            $ref: '#/definitions/StoreCreateRequest'
      security:
        - basic: []
  "/api/v1/stores/{store_id}":
    get:
      responses:
        "200":
          description: OK
          schema:
            type: object
            properties:
              id:
                type: number
              name:
                type: string
              code:
                type: string
              url:
                type: string
              client_id:
                type: number
              created_at:
                type: string
              updated_at:
                type: string
              fx_fees:
                type: number
              fx_label:
                type: string
              fx_enable:
                type: boolean
              monetary_campaign_id:
                type: integer
                description: "can be null"
              store_front_link:
                type: string
                description: "can be null"
              soft_delete:
                type: boolean
              activation_payment_link:
                type: string
              top_up_payment_link:
                type: string
              max_value:
                type: number
              min_value:
                type: number
              gift_card_values:
                type: string
              campaigns:
                type: array
                items: {}
              users:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: number
                    email:
                      type: string
                    name:
                      type: string
                    store_id:
                      type: integer
                      description: "can be null"
                    client_id:
                      type: integer
                      description: "can be null"
                    created_at:
                      type: string
                    updated_at:
                      type: string
                    payment_methods:
                      type: object
                      properties:
                        pos:
                          type: boolean
                        cash:
                          type: boolean
                        credit_card:
                          type: boolean
                    department_id:
                      type: integer
                      description: "can be null"
                    is_operator_enabled:
                      type: boolean
                    is_top_up_show:
                      type: boolean
                    menu_access:
                      type: object
                      properties:
                        top_up:
                          type: boolean
                        activation:
                          type: boolean
                        other_transaction:
                          type: boolean
                    first_name:
                      type: string
                      description: "can be null"
                    last_name:
                     type: string
                     description: "can be null"
                    phone_number:
                      type: string
                      description: "can be null"
                    cell_number:
                      type: string
                      description: "can be null"
                    terms_and_conditions:
                      type: boolean
                    enable_promotions:
                      type: boolean
                    title:
                      type: string
                      description: "can be null"
                    soft_delete:
                      type: boolean
                    store_filter_id:
                      type: integer
                      description: "can be null"
                    provider:
                      type: string
                    uid:
                      type: string
                    tokens:
                      type: string
                      description: "can be null"
                    enable_request_id:
                      type: boolean
            example:
              id: 330
              name: new store
              code: new-store-01
              url: ""
              client_id: 3
              created_at: 2024-08-19T06:38:01.356Z
              updated_at: 2024-08-19T06:38:01.356Z
              fx_fees: 10
              fx_label: exchange fee
              fx_enable: true
              monetary_campaign_id: null
              store_front_link: null
              soft_delete: false
              activation_payment_link: http://localhost:3000/card_activation?sku=005672
              top_up_payment_link: http://localhost:3000/card_topup?sku=005672
              max_value: 100000
              min_value: 1
              gift_card_values: 100,500,1000,10000,100000
              campaigns: []
              users:
                - id: 773
                  email: new-api-email@gmail.com
                  name: ""
                  store_id: null
                  client_id: null
                  created_at: 2024-08-19T06:38:01.653Z
                  updated_at: 2024-08-19T06:38:01.653Z
                  payment_methods:
                    pos: false
                    cash: false
                    credit_card: false
                  department_id: null
                  is_operator_enabled: false
                  is_top_up_show: false
                  menu_access:
                    top_up: false
                    activation: false
                    other_transaction: false
                  first_name: null
                  last_name: null
                  phone_number: null
                  cell_number: null
                  terms_and_conditions: false
                  enable_promotions: false
                  title: null
                  soft_delete: false
                  store_filter_id: null
                  provider: email
                  uid: ""
                  tokens: null
                  enable_request_id: true
          examples:
            response:
              value:
                id: 330
                name: new store
                code: new-store-01
                url: ""
                client_id: 3
                created_at: 2024-08-19T06:38:01.356Z
                updated_at: 2024-08-19T06:38:01.356Z
                fx_fees: 10
                fx_label: exchange fee
                fx_enable: true
                monetary_campaign_id: null
                store_front_link: null
                soft_delete: false
                activation_payment_link: http://localhost:3000/card_activation?sku=005672
                top_up_payment_link: http://localhost:3000/card_topup?sku=005672
                max_value: 100000
                min_value: 1
                gift_card_values: 100,500,1000,10000,100000
                campaigns: []
                users:
                  - id: 773
                    email: new-api-email@gmail.com
                    name: ""
                    store_id: null
                    client_id: null
                    created_at: 2024-08-19T06:38:01.653Z
                    updated_at: 2024-08-19T06:38:01.653Z
                    payment_methods:
                      pos: false
                      cash: false
                      credit_card: false
                    department_id: null
                    is_operator_enabled: false
                    is_top_up_show: false
                    menu_access:
                      top_up: false
                      activation: false
                      other_transaction: false
                    first_name: null
                    last_name: null
                    phone_number: null
                    cell_number: null
                    terms_and_conditions: false
                    enable_promotions: false
                    title: null
                    soft_delete: false
                    store_filter_id: null
                    provider: email
                    uid: ""
                    tokens: null
                    enable_request_id: true
      summary: Retrieve a single store by providing a Store ID.
      operationId: Show Store
      description: >-
        This API can be used to retrieve information for a specific store.

      tags:
        - Stores
      parameters:
        - name: store_id
          in: path
          description: The unique identifier of the store in the URL path.
          required: true
          type: number
      security:
        - basic: []
    put:
      responses:
        "200":
          description: OK
          schema:
            type: object
            properties:
              client_id:
                type: number
              name:
                type: string
              code:
                type: string
              max_value:
                type: number
              min_value:
                type: number
              gift_card_values:
                type: string
              fx_fees:
                type: number
              fx_label:
                type: string
              fx_enable:
                type: boolean
              monetary_campaign_id:
                type: integer
                description: "can be null"
              activation_payment_link:
                type: string
              top_up_payment_link:
                type: string
              id:
                type: number
              url:
                type: string
              created_at:
                type: string
              updated_at:
                type: string
              store_front_link:
                type: string
                description: "can be null"
              soft_delete:
                type: boolean
            example:
              client_id: 3
              name: new store updated
              code: new-store-01
              max_value: 100000
              min_value: 1
              gift_card_values: 100,500,1000,10000,100000
              fx_fees: 10
              fx_label: exchange fee
              fx_enable: true
              monetary_campaign_id: null
              activation_payment_link: http://localhost:3000/card_activation?sku=005672
              top_up_payment_link: http://localhost:3000/card_topup?sku=005672
              id: 330
              url: ""
              created_at: 2024-08-19T06:38:01.356Z
              updated_at: 2024-08-19T07:15:59.233Z
              store_front_link: null
              soft_delete: false
          examples:
            response:
              value:
                client_id: 3
                name: new store updated
                code: new-store-01
                max_value: 100000
                min_value: 1
                gift_card_values: 100,500,1000,10000,100000
                fx_fees: 10
                fx_label: exchange fee
                fx_enable: true
                monetary_campaign_id: null
                activation_payment_link: http://localhost:3000/card_activation?sku=005672
                top_up_payment_link: http://localhost:3000/card_topup?sku=005672
                id: 330
                url: ""
                created_at: 2024-08-19T06:38:01.356Z
                updated_at: 2024-08-19T07:15:59.233Z
                store_front_link: null
                soft_delete: false
      summary: Update a single store by providing a Store ID.
      operationId: Updated Store
      description: >-
        This API can be used to update a specific store by providing a store ID and correct payload.

      tags:
        - Stores
      parameters:
        - name: store_id
          in: path
          description: The unique identifier of the store in the URL path.
          required: true
          type: number
        - in: body
          name: request
          description: Payload to update the store
          required: true
          schema:
            $ref: '#/definitions/StoreUpdateRequest'    
      security:
        - basic: []
    delete:
      responses:
        "200":
          description: OK
          schema:
            type: object
            properties:
              message:
                type: string
            example:
              message: Store deleted
          examples:
            application/json:
              message: Store deleted
      summary: Delete a single Store by providing a Store ID.
      operationId: Delete Store
      description: >-
        Use this endpoint to delete a store that you specify by store ID.

      tags:
        - Stores
      parameters:
        - name: store_id
          in: path
          description: The unique identifier of the store in the URL path.
          required: true
          type: number
      security:
        - basic: []
  /api/v1/users:
    get:
      responses:
        "201":
          description: Created
          schema:
            type: array
            items:
              type: object
              properties:
                id:
                  type: number
                email:
                  type: string
                name:
                  type: string
                store_id:
                  type: integer
                  description: "can be null"
                client_id:
                  type: number
                created_at:
                  type: string
                updated_at:
                  type: string
                payment_methods:
                  type: object
                  properties:
                    pos:
                      type: boolean
                    cash:
                      type: boolean
                    credit_card:
                      type: boolean
                department_id:
                  type: number
                is_operator_enabled:
                  type: boolean
                is_top_up_show:
                  type: boolean
                menu_access:
                  type: object
                  properties:
                    top_up:
                      type: boolean
                    activation:
                      type: boolean
                    other_transaction:
                      type: boolean
                first_name:
                  type: string
                  description: "can be null"
                last_name:
                  type: string
                  description: "can be null"
                phone_number:
                  type: string
                  description: "can be null"
                cell_number:
                  type: string
                  description: "can be null"
                terms_and_conditions:
                  type: boolean
                enable_promotions:
                  type: boolean
                title:
                  type: string
                  description: "can be null"
                soft_delete:
                  type: boolean
                store_filter_id:
                  type: number
                provider:
                  type: string
                uid:
                  type: string
                tokens:
                  type: string
                  description: "can be null"
                enable_request_id:
                  type: boolean
              required:
                - id
                - email
                - name
                - store_id
                - client_id
                - created_at
                - updated_at
                - payment_methods
                - department_id
                - is_operator_enabled
                - is_top_up_show
                - menu_access
                - first_name
                - last_name
                - phone_number
                - cell_number
                - terms_and_conditions
                - enable_promotions
                - title
                - soft_delete
                - store_filter_id
                - provider
                - uid
                - tokens
                - enable_request_id
            example:
              - id: 766
                email: testing3@mailinator.com
                name: testing3
                store_id: null
                client_id: 3
                created_at: 2024-08-14T18:43:47.905Z
                updated_at: 2024-08-14T18:43:47.905Z
                payment_methods:
                  pos: false
                  cash: true
                  credit_card: true
                department_id: 192
                is_operator_enabled: true
                is_top_up_show: false
                menu_access:
                  top_up: true
                  activation: true
                  other_transaction: false
                first_name: null
                last_name: null
                phone_number: null
                cell_number: null
                terms_and_conditions: false
                enable_promotions: false
                title: null
                soft_delete: false
                store_filter_id: 227
                provider: email
                uid: ""
                tokens: null
                enable_request_id: false
              - id: 442
                email: testing@mailinator.com
                name: testing
                store_id: null
                client_id: 3
                created_at: 2024-01-15T09:49:15.305Z
                updated_at: 2024-06-26T06:56:04.195Z
                payment_methods:
                  pos: false
                  cash: true
                  credit_card: true
                department_id: 192
                is_operator_enabled: true
                is_top_up_show: false
                menu_access:
                  top_up: true
                  activation: true
                  other_transaction: false
                first_name: null
                last_name: null
                phone_number: null
                cell_number: null
                terms_and_conditions: false
                enable_promotions: false
                title: null
                soft_delete: false
                store_filter_id: 227
                provider: email
                uid: 4421eb39cdc8f04c84e8703896ad0c6
                tokens: null
                enable_request_id: false
              - id: 151
                email: imranfd@test.com
                name: imranFd
                store_id: null
                client_id: 3
                created_at: 2023-04-13T10:15:42.017Z
                updated_at: 2023-04-13T11:04:08.499Z
                payment_methods:
                  pos: false
                  cash: true
                  credit_card: true
                department_id: 132
                is_operator_enabled: true
                is_top_up_show: false
                menu_access:
                  top_up: true
                  activation: true
                  other_transaction: false
                first_name: null
                last_name: null
                phone_number: null
                cell_number: null
                terms_and_conditions: false
                enable_promotions: false
                title: null
                soft_delete: false
                store_filter_id: 13
                provider: email
                uid: 1512362efbc9adfe9799cc5dbe17d15
                tokens: null
                enable_request_id: false
              - id: 63
                email: dev123@gmail.com
                name: dev123
                store_id: null
                client_id: 3
                created_at: 2023-02-28T07:49:04.800Z
                updated_at: 2024-08-14T19:13:50.316Z
                payment_methods:
                  pos: false
                  cash: true
                  credit_card: false
                department_id: 52
                is_operator_enabled: true
                is_top_up_show: false
                menu_access:
                  top_up: true
                  activation: true
                  other_transaction: true
                first_name: null
                last_name: null
                phone_number: null
                cell_number: null
                terms_and_conditions: false
                enable_promotions: false
                title: null
                soft_delete: false
                store_filter_id: 11
                provider: email
                uid: 63cb51aeb01e00aad1f46383ab9772
                tokens: null
                enable_request_id: false
              - id: 60
                email: mehrufd2.0@gmail.com
                name: mehruFD
                store_id: null
                client_id: 3
                created_at: 2023-02-27T08:28:44.272Z
                updated_at: 2024-08-14T19:13:40.652Z
                payment_methods:
                  pos: true
                  cash: true
                  credit_card: true
                department_id: 52
                is_operator_enabled: true
                is_top_up_show: true
                menu_access:
                  top_up: true
                  activation: true
                  other_transaction: false
                first_name: null
                last_name: null
                phone_number: null
                cell_number: null
                terms_and_conditions: false
                enable_promotions: false
                title: null
                soft_delete: false
                store_filter_id: 11
                provider: email
                uid: 60440f4d516a2d74a538e79289c335
                tokens: null
                enable_request_id: false
          examples:
            response:
              value:
                - id: 766
                  email: testing3@mailinator.com
                  name: testing3
                  store_id: null
                  client_id: 3
                  created_at: 2024-08-14T18:43:47.905Z
                  updated_at: 2024-08-14T18:43:47.905Z
                  payment_methods:
                    pos: false
                    cash: true
                    credit_card: true
                  department_id: 192
                  is_operator_enabled: true
                  is_top_up_show: false
                  menu_access:
                    top_up: true
                    activation: true
                    other_transaction: false
                  first_name: null
                  last_name: null
                  phone_number: null
                  cell_number: null
                  terms_and_conditions: false
                  enable_promotions: false
                  title: null
                  soft_delete: false
                  store_filter_id: 227
                  provider: email
                  uid: ""
                  tokens: null
                  enable_request_id: false
                - id: 442
                  email: testing@mailinator.com
                  name: testing
                  store_id: null
                  client_id: 3
                  created_at: 2024-01-15T09:49:15.305Z
                  updated_at: 2024-06-26T06:56:04.195Z
                  payment_methods:
                    pos: false
                    cash: true
                    credit_card: true
                  department_id: 192
                  is_operator_enabled: true
                  is_top_up_show: false
                  menu_access:
                    top_up: true
                    activation: true
                    other_transaction: false
                  first_name: null
                  last_name: null
                  phone_number: null
                  cell_number: null
                  terms_and_conditions: false
                  enable_promotions: false
                  title: null
                  soft_delete: false
                  store_filter_id: 227
                  provider: email
                  uid: 4421eb39cdc8f04c84e8703896ad0c6
                  tokens: null
                  enable_request_id: false
                - id: 151
                  email: imranfd@test.com
                  name: imranFd
                  store_id: null
                  client_id: 3
                  created_at: 2023-04-13T10:15:42.017Z
                  updated_at: 2023-04-13T11:04:08.499Z
                  payment_methods:
                    pos: false
                    cash: true
                    credit_card: true
                  department_id: 132
                  is_operator_enabled: true
                  is_top_up_show: false
                  menu_access:
                    top_up: true
                    activation: true
                    other_transaction: false
                  first_name: null
                  last_name: null
                  phone_number: null
                  cell_number: null
                  terms_and_conditions: false
                  enable_promotions: false
                  title: null
                  soft_delete: false
                  store_filter_id: 13
                  provider: email
                  uid: 1512362efbc9adfe9799cc5dbe17d15
                  tokens: null
                  enable_request_id: false
                - id: 63
                  email: dev123@gmail.com
                  name: dev123
                  store_id: null
                  client_id: 3
                  created_at: 2023-02-28T07:49:04.800Z
                  updated_at: 2024-08-14T19:13:50.316Z
                  payment_methods:
                    pos: false
                    cash: true
                    credit_card: false
                  department_id: 52
                  is_operator_enabled: true
                  is_top_up_show: false
                  menu_access:
                    top_up: true
                    activation: true
                    other_transaction: true
                  first_name: null
                  last_name: null
                  phone_number: null
                  cell_number: null
                  terms_and_conditions: false
                  enable_promotions: false
                  title: null
                  soft_delete: false
                  store_filter_id: 11
                  provider: email
                  uid: 63cb51aeb01e00aad1f46383ab9772
                  tokens: null
                  enable_request_id: false
                - id: 60
                  email: mehrufd2.0@gmail.com
                  name: mehruFD
                  store_id: null
                  client_id: 3
                  created_at: 2023-02-27T08:28:44.272Z
                  updated_at: 2024-08-14T19:13:40.652Z
                  payment_methods:
                    pos: true
                    cash: true
                    credit_card: true
                  department_id: 52
                  is_operator_enabled: true
                  is_top_up_show: true
                  menu_access:
                    top_up: true
                    activation: true
                    other_transaction: false
                  first_name: null
                  last_name: null
                  phone_number: null
                  cell_number: null
                  terms_and_conditions: false
                  enable_promotions: false
                  title: null
                  soft_delete: false
                  store_filter_id: 11
                  provider: email
                  uid: 60440f4d516a2d74a538e79289c335
                  tokens: null
                  enable_request_id: false
      summary: Retrieve a list of all Front Desk Users.
      operationId: List All Front Desk Users Of User
      description: >-
        This API can be used to retrieve list of front desk users collection.

      tags:
        - Users
      parameters:
        - name: q
          in: query
          description: |-
            Filters for the query.
          required: false
          type: string
          
        - name: page
          in: query
          description: The page number to retrieve. Default is `1`.
          required: false
          type: number
          
        - name: per_page
          in: query
          description: The number of results per page. Default is `25`.
          required: false
          type: number
          
      security:
        - basic: []
    post:
      responses:
        "201":
          description: Created
          schema:
            type: object
            properties:
              id:
                type: number
              email:
                type: string
              name:
                type: string
              store_id:
                type: integer
                description: "can be null"
              client_id:
                type: number
              created_at:
                type: string
              updated_at:
                type: string
              payment_methods:
                type: object
                properties:
                  cash:
                    type: boolean
                  pos:
                    type: boolean
                  credit_card:
                    type: boolean
              department_id:
                type: number
              is_operator_enabled:
                type: boolean
              is_top_up_show:
                type: boolean
              menu_access:
                type: object
                properties:
                  top_up:
                    type: boolean
                  activation:
                    type: boolean
                  other_transaction:
                    type: boolean
              first_name:
                type: string
                description: "can be null"
              last_name:
                type: string
                description: "can be null"
              phone_number:
                type: string
                description: "can be null"
              cell_number:
                type: string
                description: "can be null"
              terms_and_conditions:
                type: boolean
              enable_promotions:
                type: boolean
              title:
                type: string
                description: "can be null"
              soft_delete:
                type: boolean
              store_filter_id:
                type: number
              provider:
                type: string
              uid:
                type: string
              tokens:
                type: string
                description: "can be null"
              enable_request_id:
                type: boolean
            example:
              id: 772
              email: new-fd-user@domain.com
              name: new-fd-user
              store_id: null
              client_id: 3
              created_at: 2024-08-19T05:14:59.010Z
              updated_at: 2024-08-19T05:14:59.010Z
              payment_methods:
                cash: true
                pos: false
                credit_card: true
              department_id: 200
              is_operator_enabled: true
              is_top_up_show: false
              menu_access:
                top_up: true
                activation: true
                other_transaction: false
              first_name: null
              last_name: null
              phone_number: null
              cell_number: null
              terms_and_conditions: false
              enable_promotions: false
              title: null
              soft_delete: false
              store_filter_id: 11
              provider: email
              uid: ""
              tokens: null
              enable_request_id: false
          examples:
            response:
              value:
                id: 772
                email: new-fd-user@domain.com
                name: new-fd-user
                store_id: null
                client_id: 3
                created_at: 2024-08-19T05:14:59.010Z
                updated_at: 2024-08-19T05:14:59.010Z
                payment_methods:
                  cash: true
                  pos: false
                  credit_card: true
                department_id: 200
                is_operator_enabled: true
                is_top_up_show: false
                menu_access:
                  top_up: true
                  activation: true
                  other_transaction: false
                first_name: null
                last_name: null
                phone_number: null
                cell_number: null
                terms_and_conditions: false
                enable_promotions: false
                title: null
                soft_delete: false
                store_filter_id: 11
                provider: email
                uid: ""
                tokens: null
                enable_request_id: false
      summary: Create a new Front Desk User.
      operationId: Create Front Desk Users
      description: >-
        This API can be used to create a new front desk user

      tags:
        - Users
      parameters:
        - in: body
          name: request
          description: Front Desk user creation payload
          required: true
          schema:
            $ref: '#/definitions/UserCreateRequest'
      security:
        - basic: []
  "/api/v1/users/{user_id}":
    get:
      responses:
        "200":
          description: OK
          schema:
            type: object
            properties:
              id:
                type: number
              email:
                type: string
              name:
                type: string
              store_id:
                type: integer
                description: "can be null"
              client_id:
                type: number
              created_at:
                type: string
              updated_at:
                type: string
              payment_methods:
                type: object
                properties:
                  pos:
                    type: boolean
                  cash:
                    type: boolean
                  credit_card:
                    type: boolean
              department_id:
                type: number
              is_operator_enabled:
                type: boolean
              is_top_up_show:
                type: boolean
              menu_access:
                type: object
                properties:
                  top_up:
                    type: boolean
                  activation:
                    type: boolean
                  other_transaction:
                    type: boolean
              first_name:
                type: string
                description: "can be null"
              last_name:
                type: string
                description: "can be null"
              phone_number:
                type: string
                description: "can be null"
              cell_number:
                type: string
                description: "can be null"
              terms_and_conditions:
                type: boolean
              enable_promotions:
                type: boolean
              title:
                type: string
                description: "can be null"
              soft_delete:
                type: boolean
              store_filter_id:
                type: number
              provider:
                type: string
              uid:
                type: string
              tokens:
                type: string
                description: "can be null"
              enable_request_id:
                type: boolean
              operators:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: number
                    operator_name:
                      type: string
                    pin:
                      type: string
                    user_id:
                      type: number
                    created_at:
                      type: string
                    updated_at:
                      type: string
                    soft_delete:
                      type: boolean
              stores:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: number
                    name:
                      type: string
                    code:
                      type: string
                    url:
                      type: string
                    client_id:
                      type: number
                    created_at:
                      type: string
                    updated_at:
                      type: string
                    fx_fees:
                      type: number
                    fx_label:
                      type: string
                    fx_enable:
                      type: boolean
                    monetary_campaign_id:
                      type: number
                    store_front_link:
                      type: string
                    soft_delete:
                      type: boolean
                    activation_payment_link:
                      type: string
                    top_up_payment_link:
                      type: string
                    max_value:
                      type: number
                    min_value:
                      type: number
                    gift_card_values:
                      type: string
              department:
                type: object
                properties:
                  id:
                    type: number
                  department_name:
                    type: string
                  department_description:
                    type: string
                  client_id:
                    type: integer
                    description: "can be null"
                  created_at:
                    type: string
                  updated_at:
                    type: string
                  soft_delete:
                    type: boolean
                  store_id:
                    type: number
                  store:
                    type: object
                    properties:
                      id:
                        type: number
                      name:
                        type: string
                      code:
                        type: string
                      url:
                        type: string
                      client_id:
                        type: number
                      created_at:
                        type: string
                      updated_at:
                        type: string
                      fx_fees:
                        type: number
                      fx_label:
                        type: string
                      fx_enable:
                        type: boolean
                      monetary_campaign_id:
                        type: number
                      store_front_link:
                        type: string
                      soft_delete:
                        type: boolean
                      activation_payment_link:
                        type: string
                      top_up_payment_link:
                        type: string
                      max_value:
                        type: number
                      min_value:
                        type: number
                      gift_card_values:
                        type: string
            example:
              id: 772
              email: new-fd-user@domain.com
              name: new-fd-user
              store_id: null
              client_id: 3
              created_at: 2024-08-19T05:14:59.010Z
              updated_at: 2024-08-19T05:14:59.010Z
              payment_methods:
                pos: false
                cash: true
                credit_card: true
              department_id: 200
              is_operator_enabled: true
              is_top_up_show: false
              menu_access:
                top_up: true
                activation: true
                other_transaction: false
              first_name: null
              last_name: null
              phone_number: null
              cell_number: null
              terms_and_conditions: false
              enable_promotions: false
              title: null
              soft_delete: false
              store_filter_id: 11
              provider: email
              uid: ""
              tokens: null
              enable_request_id: false
              operators:
                - id: 237
                  operator_name: operator 1
                  pin: "16651"
                  user_id: 772
                  created_at: 2024-08-19T05:14:59.035Z
                  updated_at: 2024-08-19T05:14:59.035Z
                  soft_delete: false
              stores:
                - id: 11
                  name: dev-store-1
                  code: dev-1
                  url: ""
                  client_id: 3
                  created_at: 2023-01-27T09:19:35.641Z
                  updated_at: 2024-06-21T07:22:08.578Z
                  fx_fees: 4
                  fx_label: mehru
                  fx_enable: true
                  monetary_campaign_id: 61
                  store_front_link: https://testing-admin.techsembly.com
                  soft_delete: false
                  activation_payment_link: http://localhost:3000/card_activation?sku=005672
                  top_up_payment_link: http://localhost:3000/card_topup?sku=005672
                  max_value: 100
                  min_value: 10
                  gift_card_values: 5,10,15,20, 19.11111
              department:
                id: 200
                department_name: new department name
                department_description: new department description
                client_id: null
                created_at: 2024-08-13T13:59:50.386Z
                updated_at: 2024-08-13T14:00:00.962Z
                soft_delete: false
                store_id: 11
                store:
                  id: 11
                  name: dev-store-1
                  code: dev-1
                  url: ""
                  client_id: 3
                  created_at: 2023-01-27T09:19:35.641Z
                  updated_at: 2024-06-21T07:22:08.578Z
                  fx_fees: 4
                  fx_label: mehru
                  fx_enable: true
                  monetary_campaign_id: 61
                  store_front_link: https://testing-admin.techsembly.com
                  soft_delete: false
                  activation_payment_link: http://localhost:3000/card_activation?sku=005672
                  top_up_payment_link: http://localhost:3000/card_topup?sku=005672
                  max_value: 100
                  min_value: 10
                  gift_card_values: 5,10,15,20, 19.11111
          examples:
            response:
              value:
                id: 772
                email: new-fd-user@domain.com
                name: new-fd-user
                store_id: null
                client_id: 3
                created_at: 2024-08-19T05:14:59.010Z
                updated_at: 2024-08-19T05:14:59.010Z
                payment_methods:
                  pos: false
                  cash: true
                  credit_card: true
                department_id: 200
                is_operator_enabled: true
                is_top_up_show: false
                menu_access:
                  top_up: true
                  activation: true
                  other_transaction: false
                first_name: null
                last_name: null
                phone_number: null
                cell_number: null
                terms_and_conditions: false
                enable_promotions: false
                title: null
                soft_delete: false
                store_filter_id: 11
                provider: email
                uid: ""
                tokens: null
                enable_request_id: false
                operators:
                  - id: 237
                    operator_name: operator 1
                    pin: "16651"
                    user_id: 772
                    created_at: 2024-08-19T05:14:59.035Z
                    updated_at: 2024-08-19T05:14:59.035Z
                    soft_delete: false
                stores:
                  - id: 11
                    name: dev-store-1
                    code: dev-1
                    url: ""
                    client_id: 3
                    created_at: 2023-01-27T09:19:35.641Z
                    updated_at: 2024-06-21T07:22:08.578Z
                    fx_fees: 4
                    fx_label: mehru
                    fx_enable: true
                    monetary_campaign_id: 61
                    store_front_link: https://testing-admin.techsembly.com
                    soft_delete: false
                    activation_payment_link: http://localhost:3000/card_activation?sku=005672
                    top_up_payment_link: http://localhost:3000/card_topup?sku=005672
                    max_value: 100
                    min_value: 10
                    gift_card_values: 5,10,15,20, 19.11111
                department:
                  id: 200
                  department_name: new department name
                  department_description: new department description
                  client_id: null
                  created_at: 2024-08-13T13:59:50.386Z
                  updated_at: 2024-08-13T14:00:00.962Z
                  soft_delete: false
                  store_id: 11
                  store:
                    id: 11
                    name: dev-store-1
                    code: dev-1
                    url: ""
                    client_id: 3
                    created_at: 2023-01-27T09:19:35.641Z
                    updated_at: 2024-06-21T07:22:08.578Z
                    fx_fees: 4
                    fx_label: mehru
                    fx_enable: true
                    monetary_campaign_id: 61
                    store_front_link: https://testing-admin.techsembly.com
                    soft_delete: false
                    activation_payment_link: http://localhost:3000/card_activation?sku=005672
                    top_up_payment_link: http://localhost:3000/card_topup?sku=005672
                    max_value: 100
                    min_value: 10
                    gift_card_values: 5,10,15,20, 19.11111
      summary: Retrieve a single front desk user by providing a User ID.
      operationId: Show front desk users id:13
      description: >-
        This API can be used to retrieve the information of a specific user.

      tags:
        - Users
      parameters:
        - name: user_id
          in: path
          description: The unique identifier of the user in the URL path.
          required: true
          type: number
      security:
        - basic: []
    put:
      responses:
        "201":
          description: Created
          schema:
            type: object
            properties:
              client_id:
                type: number
              store_filter_id:
                type: number
              email:
                type: string
              name:
                type: string
              department_id:
                type: number
              is_operator_enabled:
                type: boolean
              menu_access:
                type: object
                properties:
                  top_up:
                    type: boolean
                  activation:
                    type: boolean
                  other_transaction:
                    type: boolean
              payment_methods:
                type: object
                properties:
                  cash:
                    type: boolean
                  pos:
                    type: boolean
                  credit_card:
                    type: boolean
              id:
                type: number
              store_id:
                type: integer
                description: "can be null"
              created_at:
                type: string
              updated_at:
                type: string
              is_top_up_show:
                type: boolean
              first_name:
                type: string
                description: "can be null"
              last_name:
                type: string
                description: "can be null"
              phone_number:
                type: string
                description: "can be null"
              cell_number:
                type: string
                description: "can be null"
              terms_and_conditions:
                type: boolean
              enable_promotions:
                type: boolean
              title:
                type: string
                description: "can be null"
              soft_delete:
                type: boolean
              provider:
                type: string
              uid:
                type: string
              tokens:
                type: string
                description: "can be null"
              enable_request_id:
                type: boolean
            example:
              client_id: 3
              store_filter_id: 11
              email: new-fd-user@domain.com
              name: new-fd-user name updated
              department_id: 200
              is_operator_enabled: true
              menu_access:
                top_up: true
                activation: true
                other_transaction: false
              payment_methods:
                cash: true
                pos: false
                credit_card: true
              id: 772
              store_id: null
              created_at: 2024-08-19T05:14:59.010Z
              updated_at: 2024-08-19T05:36:15.035Z
              is_top_up_show: false
              first_name: null
              last_name: null
              phone_number: null
              cell_number: null
              terms_and_conditions: false
              enable_promotions: false
              title: null
              soft_delete: false
              provider: email
              uid: ""
              tokens: null
              enable_request_id: false
          examples:
            response:
              value:
                client_id: 3
                store_filter_id: 11
                email: new-fd-user@domain.com
                name: new-fd-user name updated
                department_id: 200
                is_operator_enabled: true
                menu_access:
                  top_up: true
                  activation: true
                  other_transaction: false
                payment_methods:
                  cash: true
                  pos: false
                  credit_card: true
                id: 772
                store_id: null
                created_at: 2024-08-19T05:14:59.010Z
                updated_at: 2024-08-19T05:36:15.035Z
                is_top_up_show: false
                first_name: null
                last_name: null
                phone_number: null
                cell_number: null
                terms_and_conditions: false
                enable_promotions: false
                title: null
                soft_delete: false
                provider: email
                uid: ""
                tokens: null
                enable_request_id: false
      summary: Update a single front desk user by providing a User ID.
      operationId: Updated front desk users id:13
      description: >-
        This API can be used to update a user.

      tags:
        - Users
      parameters:
        - name: user_id
          in: path
          description: The unique identifier of the user in the URL path.
          required: true
          type: number
          
        - in: body
          name: request
          description: Payload to update the user
          required: true
          schema:
            $ref: '#/definitions/UserUpdateRequest'  
      
      security:
        - basic: []
    delete:
      responses:
        "200":
          description: OK
          schema:
            type: object
            properties:
              message:
                type: string
            example:
              message: User deleted
          examples:
            response:
              value:
                message: User deleted
      summary: Delete a single Front Desk user by providing a User ID.
      operationId: Delete front desk users id:13
      description: >-
        To delete respective record you have to send the DELETE request to gift card server and it will delete respect record from the database.

      tags:
        - Users
      parameters:
        - name: user_id
          in: path
          description: The unique identifier of the user in the URL path.
          required: true
          type: number
      security:
        - basic: []
  /api/v1/users/create_bulk_front_desk:
    post:
      responses:
        "204":
          description: No Content
          headers:
            Content-Length:
              type: string
      summary: Create bulk users by uploading a CSV file with required column names.
      operationId: Create bulk users
      description: >-
        This endpoint can be used to create bulk users. Upload a valid CSV with correct column names.

      tags:
        - Users
      consumes:
        - multipart/form-data
      parameters:
        - name: file
          in: formData
          type: file
          required: true
          description: CSV file containing user data  
      security:
        - basic: []
  /api/v1/users/export_data:
    get:
      responses:
        "200":
          description: OK
          schema:
            type: array
            items:
              type: object
              properties:
                name:
                  type: string
                email:
                  type: string
                department_name:
                  type: string
                stores_v1:
                  type: string
                store_v2:
                  type: string
                cash:
                  type: boolean
                credit_card:
                  type: boolean
                activation:
                  type: boolean
                top_up:
                  type: boolean
                is_operator_enabled:
                  type: boolean
                operators:
                  type: array
                  items:
                    type: string
            example:
              - name: testing3
                email: testing3@mailinator.com
                department_name: Ahsan
                stores_v1: dev-store-1, Ahsan
                store_v2: Ahsan
                cash: true
                credit_card: true
                activation: true
                top_up: true
                is_operator_enabled: true
                operators:
                  - testing op, 49910
          examples:
            response:
              value:
                - name: testing3
                  email: testing3@mailinator.com
                  department_name: Ahsan
                  stores_v1: dev-store-1, Ahsan
                  store_v2: Ahsan
                  cash: true
                  credit_card: true
                  activation: true
                  top_up: true
                  is_operator_enabled: true
                  operators:
                    - testing op, 49910
      summary: Export the information of all Users.
      operationId: Export all users
      description: >-
        This endpoint can be used to export all users data. API response contains an array of users.
      tags:
        - Users
      security:
        - basic: []
  /api/v1/users/profile:
    get:
      responses:
        "200":
          description: OK
          schema:
            type: object
            properties:
              id:
                type: number
              email:
                type: string
              name:
                type: string
              store_id:
                type: integer
                description: "can be null"
              client_id:
                type: integer
                description: "can be null"
              created_at:
                type: string
              updated_at:
                type: string
              payment_methods:
                type: object
                properties:
                  pos:
                    type: boolean
                  cash:
                    type: boolean
                  credit_card:
                    type: boolean
              department_id:
                type: integer
                description: "can be null"
              is_operator_enabled:
                type: boolean
              is_top_up_show:
                type: boolean
              menu_access:
                type: object
                properties:
                  top_up:
                    type: boolean
                  activation:
                    type: boolean
                  other_transaction:
                    type: boolean
              first_name:
                type: string
              last_name:
                type: string
              phone_number:
                type: string
              cell_number:
                type: string
              terms_and_conditions:
                type: boolean
              enable_promotions:
                type: boolean
              title:
                type: string
              soft_delete:
                type: boolean
              store_filter_id:
                type: integer
                description: "can be null"
              provider:
                type: string
              uid:
                type: string
              tokens:
                type: string
                description: "can be null"
              enable_request_id:
                type: boolean
              shipping_address:
                type: object
                properties:
                  id:
                    type: number
                  gift_card_id:
                    type: integer
                    description: "can be null"
                  created_at:
                    type: string
                  updated_at:
                    type: string
                  firstname:
                    type: string
                  lastname:
                    type: string
                  address1:
                    type: string
                  address2:
                    type: string
                  city:
                    type: string
                  zipcode:
                    type: string
                  phone:
                    type: string
                  state_name:
                    type: string
                  state:
                    type: string
                  country:
                    type: string
                  user_id:
                    type: number
            example:
              id: 767
              email: tscustomer@gmail.com
              name: ""
              store_id: null
              client_id: null
              created_at: 2024-08-14T20:03:37.761Z
              updated_at: 2024-08-15T16:49:16.429Z
              payment_methods:
                pos: false
                cash: false
                credit_card: false
              department_id: null
              is_operator_enabled: false
              is_top_up_show: false
              menu_access:
                top_up: false
                activation: false
                other_transaction: false
              first_name: ts
              last_name: customer
              phone_number: 1234phone
              cell_number: 5678cell
              terms_and_conditions: true
              enable_promotions: true
              title: Miss
              soft_delete: false
              store_filter_id: null
              provider: email
              uid: ""
              tokens: null
              enable_request_id: false
              shipping_address:
                id: 1199
                gift_card_id: null
                created_at: 2024-08-14T20:20:23.788Z
                updated_at: 2024-08-14T20:20:23.788Z
                firstname: ""
                lastname: ""
                address1: arfa tower
                address2: ""
                city: Lahore
                zipcode: "54500"
                phone: ""
                state_name: ""
                state: Punjab
                country: Pakistan
                user_id: 767
          examples:
            response:
              value:
                id: 767
                email: tscustomer@gmail.com
                name: ""
                store_id: null
                client_id: null
                created_at: 2024-08-14T20:03:37.761Z
                updated_at: 2024-08-15T16:49:16.429Z
                payment_methods:
                  pos: false
                  cash: false
                  credit_card: false
                department_id: null
                is_operator_enabled: false
                is_top_up_show: false
                menu_access:
                  top_up: false
                  activation: false
                  other_transaction: false
                first_name: ts
                last_name: customer
                phone_number: 1234phone
                cell_number: 5678cell
                terms_and_conditions: true
                enable_promotions: true
                title: Miss
                soft_delete: false
                store_filter_id: null
                provider: email
                uid: ""
                tokens: null
                enable_request_id: false
                shipping_address:
                  id: 1199
                  gift_card_id: null
                  created_at: 2024-08-14T20:20:23.788Z
                  updated_at: 2024-08-14T20:20:23.788Z
                  firstname: ""
                  lastname: ""
                  address1: arfa tower
                  address2: ""
                  city: Lahore
                  zipcode: "54500"
                  phone: ""
                  state_name: ""
                  state: Punjab
                  country: Pakistan
                  user_id: 767
      summary: Retrieve a User profile of current signed in User.
      operationId: Get user Profile
      description: >-
        This endpoint can be used to get user Profile. It contains `User Details`,  `User Payment Methods` and `User Menu Access e.g. Topup, Activation, Other Transactions`

      tags:
        - Users
      security:
        - basic: []
  /api/v1/users/signin:
    post:
      responses:
        "200":
          description: OK
          schema:
            type: object
            properties:
              id:
                type: number
              email:
                type: string
              name:
                type: string
              store_id:
                type: integer
                description: "can be null"
              client_id:
                type: integer
                description: "can be null"
              created_at:
                type: string
              updated_at:
                type: string
              payment_methods:
                type: object
                properties:
                  pos:
                    type: boolean
                  cash:
                    type: boolean
                  credit_card:
                    type: boolean
              department_id:
                type: integer
                description: "can be null"
              is_operator_enabled:
                type: boolean
              is_top_up_show:
                type: boolean
              menu_access:
                type: object
                properties:
                  top_up:
                    type: boolean
                  activation:
                    type: boolean
                  other_transaction:
                    type: boolean
              first_name:
                type: string
              last_name:
                type: string
              phone_number:
                type: string
              cell_number:
                type: string
              terms_and_conditions:
                type: boolean
              enable_promotions:
                type: boolean
              title:
                type: string
              soft_delete:
                type: boolean
              store_filter_id:
                type: integer
                description: "can be null"
              provider:
                type: string
              uid:
                type: string
              tokens:
                type: string
                description: "can be null"
              enable_request_id:
                type: boolean
            example:
              id: 767
              email: tscustomer@gmail.com
              name: ""
              store_id: null
              client_id: null
              created_at: 2024-08-14T20:03:37.761Z
              updated_at: 2024-08-15T16:49:16.429Z
              payment_methods:
                pos: false
                cash: false
                credit_card: false
              department_id: null
              is_operator_enabled: false
              is_top_up_show: false
              menu_access:
                top_up: false
                activation: false
                other_transaction: false
              first_name: ts
              last_name: customer
              phone_number: 1234phone
              cell_number: 5678cell
              terms_and_conditions: true
              enable_promotions: true
              title: Miss
              soft_delete: false
              store_filter_id: null
              provider: email
              uid: ""
              tokens: null
              enable_request_id: false
          examples:
            response:
              value:
                id: 767
                email: tscustomer@gmail.com
                name: ""
                store_id: null
                client_id: null
                created_at: 2024-08-14T20:03:37.761Z
                updated_at: 2024-08-15T16:49:16.429Z
                payment_methods:
                  pos: false
                  cash: false
                  credit_card: false
                department_id: null
                is_operator_enabled: false
                is_top_up_show: false
                menu_access:
                  top_up: false
                  activation: false
                  other_transaction: false
                first_name: ts
                last_name: customer
                phone_number: 1234phone
                cell_number: 5678cell
                terms_and_conditions: true
                enable_promotions: true
                title: Miss
                soft_delete: false
                store_filter_id: null
                provider: email
                uid: ""
                tokens: null
                enable_request_id: false
      summary: Users can Signin by providing valid Email and Password.
      operationId: User Signin
      description: |-
        This endpoint can be used to sign in a customer on TS-Portal.
      tags:
        - Users
      parameters:
        - in: body
          name: request
          description: Payload to create/update a client
          required: true
          schema:
            properties:
              email:
                type: string
                example: "tscustomer@gmail.com"
              password:
                type: string
                example: "tscustomer@gmail.com"    
  /api/v1/users/create_customer:
    post:
      responses:
        "200":
          description: OK
          schema:
            type: object
            properties:
              id:
                type: number
              email:
                type: string
              name:
                type: string
              store_id:
                type: integer
                description: "can be null"
              client_id:
                type: integer
                description: "can be null"
              created_at:
                type: string
              updated_at:
                type: string
              payment_methods:
                type: object
                properties:
                  pos:
                    type: boolean
                  cash:
                    type: boolean
                  credit_card:
                    type: boolean
              department_id:
                type: integer
                description: "can be null"
              is_operator_enabled:
                type: boolean
              is_top_up_show:
                type: boolean
              menu_access:
                type: object
                properties:
                  top_up:
                    type: boolean
                  activation:
                    type: boolean
                  other_transaction:
                    type: boolean
              first_name:
                type: string
              last_name:
                type: string
              phone_number:
                type: string
              cell_number:
                type: string
              terms_and_conditions:
                type: boolean
              enable_promotions:
                type: boolean
              title:
                type: string
              soft_delete:
                type: boolean
              store_filter_id:
                type: integer
                description: "can be null"
              provider:
                type: string
              uid:
                type: string
              tokens:
                type: string
                description: "can be null"
              enable_request_id:
                type: boolean
            example:
              id: 767
              email: tscustomer@gmail.com
              name: ""
              store_id: null
              client_id: null
              created_at: 2024-08-14T20:03:37.761Z
              updated_at: 2024-08-14T20:03:37.761Z
              payment_methods:
                pos: false
                cash: false
                credit_card: false
              department_id: null
              is_operator_enabled: false
              is_top_up_show: false
              menu_access:
                top_up: false
                activation: false
                other_transaction: false
              first_name: ts
              last_name: customer
              phone_number: "1234"
              cell_number: "5678"
              terms_and_conditions: true
              enable_promotions: true
              title: Miss
              soft_delete: false
              store_filter_id: null
              provider: email
              uid: ""
              tokens: null
              enable_request_id: false
          examples:
            response:
              value:
                id: 767
                email: tscustomer@gmail.com
                name: ""
                store_id: null
                client_id: null
                created_at: 2024-08-14T20:03:37.761Z
                updated_at: 2024-08-14T20:03:37.761Z
                payment_methods:
                  pos: false
                  cash: false
                  credit_card: false
                department_id: null
                is_operator_enabled: false
                is_top_up_show: false
                menu_access:
                  top_up: false
                  activation: false
                  other_transaction: false
                first_name: ts
                last_name: customer
                phone_number: "1234"
                cell_number: "5678"
                terms_and_conditions: true
                enable_promotions: true
                title: Miss
                soft_delete: false
                store_filter_id: null
                provider: email
                uid: ""
                tokens: null
                enable_request_id: false
      summary: Create a new customer.
      operationId: Create a customer
      description: |-
        This endpoint can be used to create a customer.
      tags:
        - Users
      parameters:
        - in: body
          name: request
          description: Customer creation payload
          required: true
          schema:
            $ref: '#/definitions/CustomerCreateRequest'
      security:
        - basic: []
  /api/v1/users/update_customer:
    post:
      responses:
        "200":
          description: OK
          schema:
            type: object
            properties:
              title:
                type: string
              email:
                type: string
              first_name:
                type: string
              last_name:
                type: string
              phone_number:
                type: string
              cell_number:
                type: string
              terms_and_conditions:
                type: boolean
              enable_promotions:
                type: boolean
              id:
                type: number
              name:
                type: string
              store_id:
                type: integer
                description: "can be null"
              client_id:
                type: integer
                description: "can be null"
              created_at:
                type: string
              updated_at:
                type: string
              payment_methods:
                type: object
                properties:
                  pos:
                    type: boolean
                  cash:
                    type: boolean
                  credit_card:
                    type: boolean
              department_id:
                type: integer
                description: "can be null"
              is_operator_enabled:
                type: boolean
              is_top_up_show:
                type: boolean
              menu_access:
                type: object
                properties:
                  top_up:
                    type: boolean
                  activation:
                    type: boolean
                  other_transaction:
                    type: boolean
              soft_delete:
                type: boolean
              store_filter_id:
                type: integer
                description: "can be null"
              provider:
                type: string
              uid:
                type: string
              tokens:
                type: string
                description: "can be null"
              enable_request_id:
                type: boolean
            example:
              title: Miss
              email: tscustomer@gmail.com
              first_name: ts
              last_name: customer
              phone_number: 1234phone
              cell_number: 5678cell
              terms_and_conditions: true
              enable_promotions: true
              id: 767
              name: ""
              store_id: null
              client_id: null
              created_at: 2024-08-14T20:03:37.761Z
              updated_at: 2024-08-14T20:09:49.088Z
              payment_methods:
                pos: false
                cash: false
                credit_card: false
              department_id: null
              is_operator_enabled: false
              is_top_up_show: false
              menu_access:
                top_up: false
                activation: false
                other_transaction: false
              soft_delete: false
              store_filter_id: null
              provider: email
              uid: ""
              tokens: null
              enable_request_id: false
          examples:
            response:
              value:
                title: Miss
                email: tscustomer@gmail.com
                first_name: ts
                last_name: customer
                phone_number: 1234phone
                cell_number: 5678cell
                terms_and_conditions: true
                enable_promotions: true
                id: 767
                name: ""
                store_id: null
                client_id: null
                created_at: 2024-08-14T20:03:37.761Z
                updated_at: 2024-08-14T20:09:49.088Z
                payment_methods:
                  pos: false
                  cash: false
                  credit_card: false
                department_id: null
                is_operator_enabled: false
                is_top_up_show: false
                menu_access:
                  top_up: false
                  activation: false
                  other_transaction: false
                soft_delete: false
                store_filter_id: null
                provider: email
                uid: ""
                tokens: null
                enable_request_id: false
      summary: Update a specific customer.
      operationId: Update a customer
      description: |-
        This endpoint can be used to update a customer.
      tags:
        - Users
      parameters:
        - in: body
          name: request
          description: Payload to update a customer
          required: true
          schema:
            $ref: '#/definitions/CustomerCreateRequest'
      security:
        - basic: []
  /api/v1/users/change_password:
    post:
      responses:
        "200":
          description: OK
          schema:
            type: object
            properties:
              message:
                type: string
            example:
              message: Password updated successfully
          examples:
            response:
              value:
                message: Password updated successfully
      summary: Change a customer's Password.
      operationId: Change a customers Password
      description: |-
        This endpoint can be used to change customer password.
      tags:
        - Users
      parameters:
        - in: body
          name: request
          description: Customer password change.
          required: true
          schema:
            $ref: '#/definitions/CustomerChangePassword'

      security:
        - basic: []
  /api/v1/scheduled_reports:
    post:
      responses:
        "200":
            description: OK
      summary: Generate a Scheduled Report.
      operationId: Create a scheduled report
      description: >-
        This endpoint can be used to create a scheduled report.
      tags:
        - Reports
        
      parameters:
        - in: body
          name: request
          description: Generate a schedule report
          required: true
          schema:
            $ref: '#/definitions/ScheduleReportRequest'  
      security:
        - basic: []
tags:
  - name: Clients
    description: Client CRUD operations and report management.
  - name: Gift Cards
    description: Gift Cards management.
  - name: Campaigns
    description: CRUD operations for Campaigns.
  - name: Stores
    description: CRUD operations for Stores.
  - name: Users
    description: Users management.
  - name: Passwords
    description: Reset password APIs.
  - name: Reports
    description: Reports management.
schemes:
  - https
host: tsgifts-staging.techsembly.com
securityDefinitions:
  basic:
    type: basic
definitions:
  CustomerChangePassword:
    type: object
    required:
      - current_password
      - new_password
      - confirm_password
    properties:
      current_password:
        type: string
        format: password
        description: Current password of the user
        example: "tscustomer@gmail.com"
      new_password:
        type: string
        format: password
        description: New password to be set
        example: "tscustomer456@gmail.com"
      confirm_password:
        type: string
        format: password
        description: Must match the new password
        example: "tscustomer456@gmail.com"
  CustomerCreateRequest:
    type: object
    required:
      - user
    properties:
      user:
        type: object
        required:
          - title
          - first_name
          - last_name
          - phone_number
          - cell_number
          - email
          - email_confirmation
          - password
          - password_confirmation
          - terms_and_conditions
        properties:
          title:
            type: string
            example: "Miss"
          first_name:
            type: string
            example: "ts"
          last_name:
            type: string
            example: "customer"
          phone_number:
            type: string
            example: "1234"
          cell_number:
            type: string
            example: "5678"
          email:
            type: string
            format: email
            example: "tscustomer@gmail.com"
          email_confirmation:
            type: string
            format: email
            example: "tscustomer@gmail.com"
          password:
            type: string
            format: password
            example: "tscustomer@gmail.com"
          password_confirmation:
            type: string
            format: password
            example: "tscustomer@gmail.com"
          terms_and_conditions:
            type: boolean
            description: Must be `true` to accept terms
            example: true
          enable_promotions:
            type: boolean
            description: Whether to receive promotional emails
            example: true
          shipping_address_attributes:
            type: object
            required:
              - address1
              - city
              - country
              - state
              - zipcode
            properties:
              address1:
                type: string
                example: "arfa tower"
              city:
                type: string
                example: "Lahore"
              country:
                type: string
                example: "Pakistan"
              state:
                type: string
                example: "Punjab"
              zipcode:
                type: string
                example: "54500"
  UserUpdateRequest:
    type: object
    required:
      - user
    properties:
      user:
        type: object
        required:
          - name
          - email
          - store_ids
          - department_id
          - is_operator_enabled
          - payment_methods
          - menu_access
          - password
        properties:
          name:
            type: string
            example: "new-fd-user"
          email:
            type: string
            format: email
            example: "new-fd-user@domain.com"
          store_ids:
            type: array
            items:
              type: string
            example: ["11"]
          department_id:
            type: string
            example: "200"
          is_operator_enabled:
            type: boolean
            example: true
          payment_methods:
            type: object
            properties:
              cash:
                type: boolean
                example: true
              pos:
                type: boolean
                example: false
              credit_card:
                type: boolean
                example: true
          operators_attributes:
            type: array
            items:
              type: object
              properties:
                id:
                  type: string
                  description: "can be null"
                  example: "1"
                operator_name:
                  type: string
                  example: "operator 1"
          menu_access:
            type: object
            properties:
              top_up:
                type: boolean
                example: true
              activation:
                type: boolean
                example: true
              other_transaction:
                type: boolean
                example: false
          password:
            type: string
            format: password
            example: "123456"
  UserCreateRequest:
    type: object
    required:
      - user
    properties:
      user:
        type: object
        required:
          - name
          - email
          - store_ids
          - department_id
          - is_operator_enabled
          - payment_methods
          - menu_access
          - password
        properties:
          name:
            type: string
            example: "new-fd-user"
          email:
            type: string
            format: email
            example: "new-fd-user@domain.com"
          store_ids:
            type: array
            items:
              type: string
            example: ["11"]
          department_id:
            type: string
            example: "200"
          is_operator_enabled:
            type: boolean
            example: true
          payment_methods:
            type: object
            properties:
              cash:
                type: boolean
                example: true
              pos:
                type: boolean
                example: false
              credit_card:
                type: boolean
                example: true
          operators_attributes:
            type: array
            items:
              type: object
              properties:
                id:
                  type: string
                  description: "can be null"
                  example: ""
                operator_name:
                  type: string
                  example: "operator 1"
          menu_access:
            type: object
            properties:
              top_up:
                type: boolean
                example: true
              activation:
                type: boolean
                example: true
              other_transaction:
                type: boolean
                example: false
          password:
            type: string
            format: password
            example: "123456"
  StoreUpdateRequest:
    type: object
    required:
      - store
    properties:
      store:
        type: object
        required:
          - name
          - code
          - fx_enable
          - fx_label
          - fx_fees
          - top_up_payment_link
          - activation_payment_link
          - min_value
          - max_value
          - gift_card_values
          - users_attributes
        properties:
          name:
            type: string
            example: "store updated"
          code:
            type: string
            example: "new-store-01"
          fx_enable:
            type: boolean
            example: true
          fx_label:
            type: string
            example: "exchange fee"
          fx_fees:
            type: number
            format: float
            example: 10
          monetary_campaign_id:
            type: string
            description: "can be null"
            example: ""
          top_up_payment_link:
            type: string
            format: uri
            example: "http://localhost:3000/card_topup?sku=005672"
          activation_payment_link:
            type: string
            format: uri
            example: "http://localhost:3000/card_activation?sku=005672"
          min_value:
            type: integer
            example: 1
          max_value:
            type: integer
            example: 100000
          gift_card_values:
            type: string
            description: "Comma-separated gift card values"
            example: "100,500,1000,10000,100000"
          users_attributes:
            type: array
            items:
              type: object
              required:
                - email
                - password
              properties:
                email:
                  type: string
                  format: email
                  example: "new-api-email@gmail.com"
                enable_request_id:
                  type: boolean
                  example: true
  StoreCreateRequest:
    type: object
    required:
      - store
    properties:
      store:
        type: object
        required:
          - name
          - code
          - fx_enable
          - fx_label
          - fx_fees
          - top_up_payment_link
          - activation_payment_link
          - min_value
          - max_value
          - gift_card_values
          - users_attributes
        properties:
          name:
            type: string
            example: "new store"
          code:
            type: string
            example: "new-store-01"
          fx_enable:
            type: boolean
            example: true
          fx_label:
            type: string
            example: "exchange fee"
          fx_fees:
            type: number
            format: float
            example: 10
          monetary_campaign_id:
            type: string
            description: "can be null"
            example: ""
          top_up_payment_link:
            type: string
            format: uri
            example: "http://localhost:3000/card_topup?sku=005672"
          activation_payment_link:
            type: string
            format: uri
            example: "http://localhost:3000/card_activation?sku=005672"
          min_value:
            type: integer
            example: 1
          max_value:
            type: integer
            example: 100000
          gift_card_values:
            type: string
            description: "Comma-separated gift card values"
            example: "100,500,1000,10000,100000"
          users_attributes:
            type: array
            items:
              type: object
              required:
                - email
                - password
              properties:
                id:
                  type: string
                  description: "can be null"
                  example: ""
                email:
                  type: string
                  format: email
                  example: "new-api-email@gmail.com"
                password:
                  type: string
                  format: password
                  example: "1234567"
                enable_request_id:
                  type: boolean
                  example: true
                roles_attributes:
                  type: array
                  items:
                    type: object
                    required:
                      - name
                    properties:
                      name:
                        type: string
                        example: "api"
  ScheduleReportRequest:
    type: object
    required:
      - id
      - report_type
      - fetch_from
      - password
      - ts_store_ids
      - timezone
      - report_currency_code
      - report_currency_ex_rates
    properties:
      id:
        type: integer
        example: 113
      report_type:
        type: string
        example: "gift_cards_transactions"
      fetch_from:
        type: string
        format: date-time
        example: "2024-08-01T00:00:00+05:00"
      password:
        type: string
        example: "user@email.com"
      ts_store_ids:
        type: array
        items:
          type: string
        example: ["11"]
      timezone:
        type: string
        example: "Europe/London"
      report_currency_code:
        type: string
        example: "SGD"
      report_currency_ex_rates:
        type: array
        items:
          type: object
          required:
            - to_currency
            - from_currency
            - value
          properties:
            to_currency:
              type: string
              example: "SGD"
            from_currency:
              type: string
              example: "AED"
            value:
              type: number
              format: float
              example: 0.3714e0
        example:
          - to_currency: "SGD"
            from_currency: "AED"
            value: 0.3714e0
          - to_currency: "SGD"
            from_currency: "AUD"
            value: 0.9289e0
          - to_currency: "SGD"
            from_currency: "GBP"
            value: 0.182e1
          - to_currency: "SGD"
            from_currency: "HKD"
            value: 0.174e0
  ResetPassword:
    type: object
    required:
      - password
      - password_confirmation
      - reset_password_token
    properties:
      password:
        type: string
        example: "tscustomer@gmail.com"
      password_confirmation:
        type: string
        example: "tscustomer@gmail.com" 
      reset_password_token:
        type: string
        example: "z6Fy2saZEMt7T1PLe8Kg"  
  ResetPasswordToken:
    type: object
    required:
      - store_url
      - email
    properties:
      store_url:
        type: string
        example: "http://localhost:3000/ts-portal"
      email:
        type: "string"
        format: email
        example: "user@email.com"
  UpdateStatus:
    type: object
    required:
      - number
      - pin
      - status
    properties:
      number:
        type: string
        example: "791400114701023414"
      pin:
        type: string
        example: "52169"
      status:
        type: string
        example: "lost"
  RemoveCard:
    type: object
    required:
      - number
      - pin
      - status
    properties:
      number:
        type: string
        example: "456038848301023363"
      pin:
        type: string
        example: "52169"
      status:
        type: string
        example: "remove"  
  AssignToCustomer:
    type: object
    required:
      - number
      - pin
    properties:
      number:
        type: string
        example: "935896188801023413"
      pin:
        type: string
        example: "24429"
  GiftCardCheckBalance:
    type: object
    required:
      - number
      - pin
    properties:
      number:
        type: string
        example: "791400114701023414"
      pin:
        type: string
        example: "69337"
  GiftCardCreditRequest:
    type: object
    required:
      - amount
      - notes
      - currency
      - external_invoice_id
      - number
    properties:
      amount:
        type: number
        format: float
        example: 123123
      notes:
        type: string
        example: "USD"
      currency:
        type: string
        example: "USD"  
      external_invoice_id:
        type: string
        example: "234234"  
      number:
        type: string
        example: "8108449962"  
  GiftCardRedeemRequest:
    type: object
    required:
      - creator_attributes
      - number
      - pin
      - sku
      - store_id
    properties:
      creator_attributes:
        type: object
        required:
          - creator_email
          - creator_role
        properties:
          creator_email:
            type: string
            format: email
            description: "Email of the user performing the redeem action."
            example: "user@email.com"
          creator_role:
            type: string
            description: "Role of the user (e.g., front_desk, client)."
            example: "front_desk"
      number:
        type: string
        description: "Gift card number."
        example: "791400114701023414"
      pin:
        type: string
        description: "Gift card pin."
        example: "69337"
      sku:
        type: string
        description: "SKU associated with the gift card."
        example: "swim"
      store_id:
        type: string
        description: "Store identifier where the gift card is redeemed."
        example: "11"
  GiftCardUpdateRequest:
    type: object
    required:
      - gift_card
    properties:
      gift_card:
        type: object
        required:
          - status
          - transitions_attributes
        properties:
          status:
            type: string
            description: "Status of the gift card."
            example: "blocked"
          transitions_attributes:
            type: array
            description: "List of state transitions for the gift card."
            items:
              type: object
              required:
                - transition_state_name
                - current_state
                - creator_attributes
              properties:
                transition_state_name:
                  type: string
                  description: "The state attribute being transitioned (e.g., status)."
                  example: "status"
                notes:
                  type: string
                  description: "Optional notes about the transition."
                  example: "dsa"
                pervious_state:
                  type: string
                  description: "Previous state of the gift card."
                  example: "active"
                current_state:
                  type: string
                  description: "New state of the gift card."
                  example: "blocked"
                creator_attributes:
                  type: object
                  required:
                    - creator_email
                    - creator_role
                  properties:
                    creator_email:
                      type: string
                      format: email
                      description: "Email of the user performing the transition."
                      example: "dev@client.com"
                    creator_role:
                      type: string
                      description: "Role of the creator."
                      example: "client"
  GiftCardCreateRequest:
    type: object
    required:
      - card_type
      - value
      - currency
      - delivery_mode
      - campaign_code
      - from_address
      - product_name
      - recipient_email
      - recipient_first_name
      - recipient_last_name
      - send_gift_card_via
      - store_id
      - creator_attributes
      - request_id
    properties:
      card_type:
        type: string
        description: "Type of card (e.g., monetary, percentage)."
        example: "monetary"
      value:
        type: string
        description: "Value of the gift card."
        example: "1000"
      currency:
        type: string
        description: "Currency of the gift card."
        example: "USD"
      delivery_mode:
        type: string
        description: "Delivery mode (e.g., digital, physical)."
        example: "digital"
      campaign_code:
        type: string
        description: "Associated campaign code."
        example: "dev-1"
      from_address:
        type: string
        description: "Sender's email address."
        format: email
        example: "wyfosykyp@mailinator.com"
      invoice_id:
        type: string
        description: "Invoice identifier."
        example: "sk-123"
      notes:
        type: string
        description: "Additional notes."
        example: "werwe"
      product_name:
        type: string
        description: "Name of the product linked to the gift card."
        example: "tesitng"
      receipient_phone_number:
        type: string
        description: "Recipient phone number."
        example: ""
      recipient_email:
        type: string
        description: "Recipient email address."
        format: email
        example: "wyfosykyp@mailinator.com"
      recipient_first_name:
        type: string
        description: "Recipient first name."
        example: "Darrel"
      recipient_last_name:
        type: string
        description: "Recipient last name."
        example: "Wiggins"
      send_gift_card_via:
        type: string
        description: "Method of sending the gift card (e.g., email, sms)."
        example: "email"
      skus:
        type: array
        description: "List of SKUs linked to the gift card."
        items:
          type: string
        example: []
      message:
        type: string
        description: "Message included with the gift card."
        example: ""
      store_id:
        type: string
        description: "Store identifier."
        example: "11"
      creator_attributes:
        type: object
        description: "Information about the creator of the gift card."
        required:
          - creator_email
          - creator_role
        properties:
          creator_email:
            type: string
            format: email
            description: "Email of the creator."
            example: "dev@tsclient.com"
          creator_role:
            type: string
            description: "Role of the creator."
            example: "1234"
      request_id:
        type: string
        description: "Unique request identifier."
        example: "1234"
      valid_from:
        type: string
        format: date-time
        description: "valid from date for the gift card"
        example: "2024-08-18"
      expiry_date:
        type: string
        format: date-time
        description: "expiry date for the gift card"
        example: "2024-08-18"
      one_time:
        type: boolean
        description: "Boolean representing if a card is one time used."
        example: false
      email_opt_in:
        type: boolean
        description: "Boolean representing if email send to recipient or not."
        example: false

  CampaignCreateRequest:
    type: object
    required:
      - campaign
    properties:
      campaign:
        type: object
        required:
          - name
          - code
          - start_date
          - end_date
          - store_ids
        properties:
          name:
            type: string
            description: "Name of campaign."
            example: "new campaign"
          code:
            type: string
            description: "Code of campaign that uniquely identifies the campaign."
            example: "new_camp1"
          start_date:
            type: string
            format: date-time
            description: "Start date of campaign."
            example: "2024-08-18T00:00:00Z"
          end_date:
            type: string
            format: date-time
            description: "End date of campaign."
            example: "2024-08-31T00:00:00Z"
          max_expiry_days:
            type: integer
            description: "Max expiry days of a campaign. Can be null."
            example: null
          store_ids:
            type: array
            description: "IDs of stores where the campaign is applicable."
            items:
              type: string
            example: ["14", "11"]
          date_specific_expiry:
            type: boolean
            description: "Boolean representing if date specific expiry is enabled."
            example: true
          is_campaign_remained_active:
            type: boolean
            description: "Boolean representing if a campaign is active."
            example: false
          is_gift_card_remained_active:
            type: boolean
            description: "Boolean representing if campaigns giftcards are active."
            example: false
          email_subject:
            type: string
            description: "Subject of campaign email template."
            example: "campaign email subject"
          email_html:
            type: string
            description: "Body of campaign email template."
            example: "campaign email template"
          body:
            type: string
            description: "Body content."
            example: ""
          specific_date:
            type: string
            format: date-time
            description: "Specific date of expiry of giftcards. Can be null."
            example: "2024-08-31T00:00:00Z"
          sms_html:
            type: string
            description: "SMS content of campaign."
            example: ""
          allow_password:
            type: boolean
            description: "Boolean to require pin during transactions."
            example: true
          transaction_email_subject:
            type: string
            description: "Transaction email subject."
            example: "user@email.com"
          transaction_email_html:
            type: string
            description: "Transaction email body."
            example: "Transaction Email Template"
          ses_from_email:
            type: string
            description: "Email to be sent from."
            example: "user@email.com"
          cc_transaction_email:
            type: string
            description: "Email to be added in CC for transaction emails."
            example: "user@email.com"
          test_mode:
            type: boolean
            description: "Marks the campaign as test campaign."
            example: true
  ClientCreateRequest:
    type: object
    required:
      - client
    properties:
      client:
        type: object
        required:
          - name
          - address
          - contact
          - origin
          - users_attributes
        properties:
          name:
            type: string
            example: "new client"
          address:
            type: string
            example: "PK"
          contact:
            type: string
            example: "123456"
          origin:
            type: string
            example: "ts_curate"
          users_attributes:
            type: array
            items:
              type: object
              required:
                - email
                - password
                - password_confirmation
              properties:
                email:
                  type: string
                  format: email
                  example: "ts_client_2@secbuf.com"
                password:
                  type: string
                  format: password
                  example: "ts_client_@secbuf.coml"
                password_confirmation:
                  type: string
                  format: password
                  example: "ts_client_@secbuf.coml"