discount types

This list contains all query and input types for the discount endpoints.


Discount

Fields

  • Name
    id
    Type
    ID!
    Description

    Unique identifier for the discount.

  • Name
    code
    Type
    String!
    Description

    The discount code.

  • Name
    value
    Type
    Float!
    Description

    The discount value.

  • Name
    type
    Type
    DiscountType!
    Description

    The discount type.

    enum DiscountType {
    	percentage
    	fixed
    }
    
  • Name
    usage_limit
    Type
    Int!
    Description

    The discount usage limit.

  • Name
    one_time_usage_per_customer
    Type
    Boolean!
    Description

    The discount one time usage per customer boolean.

  • Name
    active
    Type
    Boolean!
    Description

    The discount active boolean.

  • Name
    limited_usage
    Type
    Boolean!
    Description

    The discount limited usage boolean.

  • Name
    usage
    Type
    Int
    Description

    The discount usage.

  • Name
    tags
    Type
    [String!]!
    Description

    The discount tags.

  • Name
    product_ids
    Type
    [ID!]!
    Description

    The discount product ids.

  • Name
    updated_at
    Label
    TimeStamp!
    Description

    Timestamp of when the discount was updated.

  • Name
    created_at
    Label
    TimeStamp!
    Description

    Timestamp of when the discount was created.

  • Name
    started_at
    Label
    TimeStamp!
    Description

    Timestamp of when the discount will start.

  • Name
    expired_at
    Label
    TimeStamp!
    Description

    Timestamp of when the discount will expire.

Request

POST
https://services.lightfunnels.com/api/v2
query DiscountsQuery($first: Int, $after: String, $query: String!){
	discounts(query: "order_by:id order_dir:desc", after: "WzVE4OTA5LDEe/4OTA5XQ==", first: 10){
		edges{
			node{
				id
				name
				description
				...
			}
		}
	}
}

InputDiscount

Fields

  • Name
    code
    Type
    String!
    Description

    The discount code.

  • Name
    value
    Type
    Float!
    Description

    The discount value.

  • Name
    type
    Type
    DiscountType!
    Description

    The discount type.

    enum DiscountType {
    	percentage
    	fixed
    }
    
  • Name
    usage_limit
    Type
    Int!
    Description

    The discount usage limit.

  • Name
    active
    Type
    Boolean
    Description

    The discount active boolean.

  • Name
    one_time_usage_per_customer
    Type
    Boolean!
    Description

    The discount one time usage per customer option.

  • Name
    limited_usage
    Type
    Boolean!
    Description

    The discount limited usage option.

  • Name
    tags
    Type
    [String!]
    Description

    The discount tags.

  • Name
    product_ids
    Type
    [ID!]
    Description

    The discount product ids.

  • Name
    started_at
    Type
    TimeStamp
    Description

    Timestamp of when the discount will start.

  • Name
    expired_at
    Type
    TimeStamp
    Description

    Timestamp of when the discount will expire.


InputUpdateDiscount

Fields

  • Name
    code
    Type
    String
    Description

    The discount code.

  • Name
    value
    Type
    Float
    Description

    The discount value.

  • Name
    type
    Type
    DiscountType
    Description

    The discount type.

    enum DiscountType {
    	percentage
    	fixed
    }
    
  • Name
    usage_limit
    Type
    Int
    Description

    The discount usage limit.

  • Name
    active
    Type
    Boolean
    Description

    The discount active option.

  • Name
    one_time_usage_per_customer
    Type
    Boolean
    Description

    The discount one time usage per customer option.

  • Name
    limited_usage
    Type
    Boolean
    Description

    The discount limited usage option.

  • Name
    tags
    Type
    [String!]
    Description

    The discount tags.

  • Name
    product_ids
    Type
    [ID!]
    Description

    The discount product ids.

  • Name
    started_at
    Label
    TimeStamp
    Description

    Timestamp of when the discount will start.

  • Name
    expired_at
    Label
    TimeStamp
    Description

    Timestamp of when the discount will expire.


updateDiscountMutationInput

Fields

  • Name
    id
    Type
    ID!
    Description

    Unique identifier for the discount.

  • Name
    node
    Label
    InputUpdateDiscount!
    Description

    The discount node.

  • Name
    clientMutationId
    Type
    String
    Description

    The discount client mutation id.

Request

POST
https://services.lightfunnels.com/api/v2
mutation mutationName($input: updateDiscountMutationInput!) {
	updateDiscount(input: $input){
		# updateDiscountMutationPayload type fields
	}
}

createDiscountMutationInput

Fields

  • Name
    node
    Label
    InputDiscount!
    Description

    The discount node.

  • Name
    clientMutationId
    Type
    String
    Description

    The discount client mutation id.

Request

POST
https://services.lightfunnels.com/api/v2
mutation mutationName($input: createDiscountMutationInput!) {
	createDiscount(input: $input){
		# createDiscountMutationPayload type fields
	}
}

updateDiscountMutationPayload

Fields

  • Name
    node
    Label
    Discount
    Description

    The discount node.

  • Name
    clientMutationId
    Type
    String
    Description

    The discount client mutation id.


createDiscountMutationPayload

Fields

  • Name
    node
    Label
    Discount!
    Description

    The discount node.

  • Name
    clientMutationId
    Type
    String
    Description

    The discount client mutation id.


DiscountConnection

Fields

  • Name
    pageInfo
    Type
    PageInfo!
    Description

    Discount connection page info.

    type PageInfo {
    	hasNextPage: Boolean!
    	hasPreviousPage: Boolean!
    	startCursor: String
    	endCursor: String
    }
    
  • Name
    edges
    Type
    [DiscountEdge]
    Description

    The Discount connection edges.

    type DiscountEdge {
    	node: Discount
    	cursor: String!
    }