Create a card

Simple card creation

Configuration

Variable

Description

account_id

This represents the Toggle account that you are connecting to. You can get a list of accounts linked with your API user using an Accounts query.

sales_channel_id

Sales channels allow reporting by the source of an order. Commonly used are:

3 - In store

5 - B2B

7 - Guest Gratuity

product_id

All cards created need to be associated back to a product. Products can be created in the Toggle dashboard. You can retrieve a list of products for an account using the Products query.

merchant_id

Orders can be linked back to specific merchants. You can use 26 as a catch-all "third party" merchant. But if you are an official Toggle partner, you'll have been issued your own merchant_id.


mutation(
  $account_id                   : Int!
  $order_items                  : [OrderItemInput]!
  $total                        : Int!
  $currency                     : String!
  $group_fulfilment             : Boolean!
  $sales_channel_id             : Int!
  $auto_fulfil_group_fulfilment : Boolean!
  $merchant_id                  : Int!
  
) {
  createOrder(
    account_id                   :   $account_id,  
    order_items                  :   $order_items,
    total                        :   $total,
    currency                     :   $currency,
    group_fulfilment             :   $group_fulfilment,
    sales_channel_id             :   $sales_channel_id,
    auto_fulfil_group_fulfilment :   $auto_fulfil_group_fulfilment,
    merchant_id                  :   $merchant_id
  ) {
    LineItems{
        Card{
            id,
            card_reference,
            pin,
            balance
        }
    }
  }
}

Last updated