LineItemSellingPlan

sasha17
New Member
5 0 0

Hi, I am using Python shopify library to retrieve data on orders. When querying shopify.Order.find()[0].attributes['line_items'][0].attributes  the selling plan isn't in the returned attributes. All I get is ['id', 'admin_graphql_api_id', 'fulfillable_quantity', 'fulfillment_service', 'fulfillment_status', 'gift_card', 'grams', 'name', 'price', 'price_set', 'product_exists', 'product_id', 'properties', 'quantity', 'requires_shipping', 'sku', 'taxable', 'title', 'total_discount', 'total_discount_set', 'variant_id', 'variant_inventory_management', 'variant_title', 'vendor', 'tax_lines', 'duties', 'discount_allocations']. Could you please advise? Thanks

Replies 2 (2)

dwyckoff
Shopify Staff
15 1 3

Hey Sasha,
Does your order actually contain a selling plan? Are you using our GraphQL admin API, or are you still using REST? Our REST APIs do not support selling plans.
If you believe everything is configured correctly, I could take a look on our end if you provide an Order ID and Shop ID.
Hope that context helps!
- Daniel.

To learn more visit the Shopify Help Center or the Community Blog.

sasha17
New Member
5 0 0

Thank you for your reply Daniel, it was indeed REST. Can you provide a sample GraphQL query to retrieve the following information: order_name, lineitem_name, lineitem_variant_title, lineitem_selling_plan_id for orders between start_date and end_date