Quantcast
Channel: Opinion: Shopify Community - Shopify APIs & SDKs
Viewing all 25503 articles
Browse latest View live

Partial lines cancellation API by Raju

$
0
0

Hello,

 

Can you please guide if there is an API to cancel the partial lines that are not fullfilled?

 

It would be great if you can provide sample API script. 

 

Thanks,

Raju 


Rails application Webhook error in Home Page Controller index action by Fashon For Men Admin

$
0
0

Hi I am new to the Shopify,

I am tring to register webhooks, I followd this documentation.

I added below code in shopify_app.rb file

config.webhooks = [
{topic: 'carts/create', address: 'https://95ecca2derw.ngrok.io/webhooks/carts_create', format: 'json'},
{topic: 'carts/update', address: 'https://95ecca2drew.ngrok.io/webhooks/carts_update', format: 'json'}
]
I created 2 jobs for carts/create and carts/update
App is throwing errors while installing.
here is the errors :
Processing by HomeController#index as HTML
Shop Load (0.9ms) SELECT "shops".* FROM "shops" WHERE "shops"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
[ActiveJob] [ShopifyApp::WebhooksManagerJob] [6800b7fd-59d1-42c2-9aca-f959e8ed93cc] Error performing ShopifyApp::WebhooksManagerJob (Job ID: 6800b7fd-59d1-42c2-9aca-f959e8ed93cc) from Async(default) in 2828.1ms: ShopifyApp::WebhooksManager::CreationFailed (Topic Invalid topic specified. Topics allowed: app/uninstalled, collections/create, collections/delete, collections/update, products/create, products/delete, products/update, shop/update):

Can anyone please help me

Paul L. Newton commented on Checkout API

$
0
0

in-store pickup - customers in some countries are accustomed to various in-store pickup networks where they can have their order delivered. They usually pick that shipping method and choose from a list of locations nearby or on a map widget.

Basic In-store pickup can be handled with shipping rates(example walkthrough), wouldn't this mean just identifying locations in different rate configs then having fulfilment handle the addressing to the pickup location.

Just american perspective while companies like Fedex etc have things like "hold at location" they're already integrated and the choice is more on the customer/fedex's side of things. Getting a custom "business network" integration generally comes with the understanding that revenue can easily handle fees to develop it, and the required backend to enable it because of the revenue it will then generate.

I'm curious though wouldn't mind looking into this style of delivery more if you could provide some names or links to reference.

 

Wilhelm Uschtrin commented on Problem fetching images

Sergiu Svinarciuc commented on Rails application Webhook error in Home Page Controller index action

$
0
0

Hey there,

The list of allowed topics you are getting in the error message are the only ones available for you and granted access to based on the scope your token has been created with. Most probably you might need order read/write access scope added to the list of scopes in config.scope

Karl Offenberger commented on Checkout API

$
0
0

@Paul L Newton

Yes, in fact the shipping rates do not change. However, customers are used to choosing this option and being given a dropdown of pickup locations or a map. These UI widgets are typically a little fancier than a regular select box and can autocomplete, filter nearest store, update store locations based on daily data about holidays, vacations, opening/closing hours etc. Mind you, these are random stores that sign up with the in-store pickup service provider.

It really is quite convenient for customers and very common in some countries - in fact here in Czechia where online shoppers are atypical, some 30% of all customers want to have their goods delivered in store and paid on the spot. However, checkout is only customizable for Plus plan and we cannot offer this kind of UI modification to shipping method and shipping address.

Have a look at https://www.zasilkovna.cz/eshopy or https://www.ulozenka.cz/pro-prijemce-zasilek with old friend google translate for a bit more info on the topic.

Sergiu Svinarciuc commented on How to check which stores have our app installed and which do not?

Problem cancelling and refunding a simple order by Pedro Domingues

$
0
0

Dear Shopify,

 

I have cancelled the order 680277803097 using the REST API.

However despite my indications for refunding, Shopify did not refund this order (I had to do it manually through the interface). However, Shopify did cancel the order.

 

This was the JSON payload I sent to the API:

 

{

  "email": true,

  "refund": {

    "shipping": {

      "full_refund": true

    },

    "refund_line_items": [

      {

        "line_item_id": "1584110665817",

        "quantity": 1,

        "restock_type": "no_restock"

      }

    ],

    "restock": false

  }

}

 

 

This was sent to /orders/680277803097/cancel.json

 

What did I miss here? Why didn't Shopify refunded the customer automatically?

 

Thanks!


Karl Offenberger commented on Partial lines cancellation API

$
0
0

@Raju

As far as I am aware, line items in an order cannot be edited via API. You would have to create a new order.

Karl Offenberger commented on Problem cancelling and refunding a simple order

$
0
0

Hi Pedro,

You are missing the transactions property in the refund.

{
  "email": true,
	"refund": {
		"currency": "CZK",
		"shipping": {
			"full_refund": true
		},
		"refund_line_items": [
			{
				"line_item_id": 1986159542387,
				"quantity": 1
			}
		],
		"transactions": [
			{
				"parent_id": 902690340979,
				"amount": 380.00,
				"kind": "refund",
				"gateway": "bogus"
			}
		]
	}
}

Where parent_id is the transaction ID of an order, i.e. an authorization transaction. Can query those by following this doc.

Hope that helps.

Who makes request to server? by Awin Advertiser Tracking Admin

$
0
0

Hi,

I was directed by Shopify Support to this forum to ask the following question.

When a customer chooses to install the app and presses the install button, will it be their IP address that's used to make the request to the server, or will Shopify make the request? It seems logical that if the customers IP address was used, the files would be sent back to that address, rather than being installed onto the Shopify dashboard.

Any feedback would be greatly appreciated.

GraphQL API: Field 'draftOrderCreate' doesn't exist on type 'Mutation' by David Hopkins

$
0
0

The GraphQL API outlines creating draft orders in the documentation.

https://help.shopify.com/en/api/graphql-admin-api/reference/mutation/draftordercreate

When running the query i receive errors.

{
    errors: [{
        message: "Field 'draftOrderCreate' doesn't exist on type 'Mutation'",
        locations: [{
            line: 2,
            column: 3
        }],
        fields: [
            "mutation",
            "draftOrderCreate"
        ]
    },
    {
        message: "Field 'draftOrder' doesn't exist on type 'Mutation'",
        locations: [{
            line: 8,
            column: 3
        }],
        fields: [
            "mutation",
            "draftOrder"
        ]
    }]
}

I can't see anywhere about this endpoint being deprecated or removed, all the access permissions are correct... what am I missing? 

Cheers

Fashon For Men Admin commented on Rails application Webhook error in Home Page Controller index action

$
0
0

A ton of Thanks Sergiu, works perfectly as expected.

REST API: Querying visited products by Pablo

$
0
0

Is there a way to retrieve the visited products for a range of time using the REST API?

Karl Offenberger commented on REST API: Querying visited products

$
0
0

Hi @Pablo

Possibly using Reports / ShopifyQL from Analytics API, but those require Advnced or Plus plan.

I suggest looking in to other web analytics solutions.

Hope that helps!


Thomas commented on Who makes request to server?

Karl Offenberger commented on GraphQL API: Field 'draftOrderCreate' doesn't exist on type 'Mutation'

$
0
0

Hi David,

Could you please provide the mutation you have used? The one shown in documentation has an invalid input query variable as DraftOrderObject requires lineItems field at the very least.

Running this mutation with vars as shown, I am able to successfully create the draft order:

# create draft order
mutation draftOrderCreate($input: DraftOrderInput!) {
  draftOrderCreate(input: $input) {
    userErrors {
      field
      message
    }
    draftOrder {
      id
    }
  }
}

# query variables
{
  "input": {
    "lineItems": [
      {
        "variantId": "PASTE_VARIANT_ID_HERE",
        "quantity": 1
      }
    ]
  }
}

Hope that helps!

Awin Advertiser Tracking Admin commented on Who makes request to server?

$
0
0

During testing we want to limit who has access to the sever. Therefore, we need to know if we need to whitelist a Shopify IP range (if it's the case the request is made by Shopify), or just a few IP addresses that we use, if the request is made by the customer.

 

Hope that helps.

 

Maris commented on Using the order timeline on the admin API

$
0
0

+100 from me too about this!

Very much needed!

Pablo commented on REST API: Querying visited products

$
0
0

Thanks! I'll reword the question: How can I know when a customer viewed a product?

Viewing all 25503 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>