Shipping Label - Integrate with Royal Mail Click and Drop

Shipping Label - Integrate with Royal Mail Click and Drop

Royal Mail supports integration with various online stores and marketplaces

 

Integration with Square would be great so that shipping labels could be automatically created, and postage paid

 

https://www.royalmail.com/sites/default/files/click-how-to-guide.pdf

https://personal.help.royalmail.com/app/answers/detail/a_id/11716/~/click-%26-drop---connect-your-ch...

 

Regards

Jools

1 Verified Answer
Verified Answer

Re: Shipping Label - Integrate with Royal Mail Click and Drop

Hello everyone, this is Alex from the Square Online product team. We know how frustrating it is to have been told that a Royal Mail Click & Drop integration is on the roadmap for two years, and we're sorry that we haven't yet been able to launch this for you. Behind the scenes, we're in the process of making some fundamental changes to our shipping product, so we decided to build all shipping carrier integrations (not just Royal Mail) in a way that aligns with our long term strategy. This will take us time to fully execute. We also understand that you have to make decisions about how to operate your business, and that an expectation of a Royal Mail integration has been a key factor in choosing to continue using Square. Unfortunately, we don't have a concrete update that we can share with you on our plans or timeline for this today, but we'll be sure to post in this thread when our beta is ready for you. 

209 Replies

any updates

Alumni

Hey @Hhibbard3D, thanks for your post. We currently do not have any updates on this feature request at this time. We'll be sure to update this thread once we do, though.

 

Let me know if you need anything else. Happy to help. 

Just need an app that pulls the order and sends it to Royal Mail and back 

working on something to allow royal mail  integration 

Square Champion

I spoke with a UK Square team person yesterday and mentioned that there is a growing number of people asking for this integration. Mentioned that other service providers Shopify, WooCommerce, Bluepark, Onebuy, ebay, magneto,  Square Space and so own have this integration already and that UK companies using Square are at a competitive disadvantage. She asked why this would be and I responded that to fulfil 100 orders with the integration takes less than 5 mins, the same with Square would take all day cutting an pasting the orders over. I would call this a competitive disadvantage. She said she would forward the request to the appropriate team for consideration. 🤞

# Import necessary libraries
import requests
import json

# Set the API endpoints for Square and Royal Mail
square_api_endpoint = "https://connect.squareup.com/v2"
royalmail_api_endpoint = "https://api.parcel.royalmail.com/api/v1"

# Set the Square API credentials and the Royal Mail API key
square_api_key = "YOUR_SQUARE_API_KEY"
royalmail_api_key = "YOUR_ROYALMAIL_API_KEY"

# Set the webhook endpoint for Square to receive notifications about new orders
square_webhook_endpoint = "https://your-server.com/square_webhook"

# Define a function to create an order in Royal Mail API and return the tracking number
def create_shipping_label(name, address):
# Define the request body to create a shipping label in Royal Mail API
request_body = {
"name": name,
"address": address
}

# Set the headers and authentication for the Royal Mail API request
headers = {
"Content-Type": "application/json",
"X-Api-Key": royalmail_api_key
}

# Send the request to create a shipping label in Royal Mail API and receive the tracking number
response = requests.post(f"{royalmail_api_endpoint}/shipping-labels", headers=headers, json=request_body)
tracking_number = response.json()["tracking_number"]

# Return the tracking number
return tracking_number

# Define a function to handle Square order webhooks and create a shipping label in Royal Mail API
def handle_square_order_webhook(payload):
# Get the order information from the payload
order_id = payload["data"]["object"]["id"]
name = payload["data"]["object"]["shipping_address"]["name"]
address = payload["data"]["object"]["shipping_address"]["address_line_1"]

# Create a shipping label in Royal Mail API and get the tracking number
tracking_number = create_shipping_label(name, address)

# Set the order note with the tracking number
order_note = f"Tracking number: {tracking_number}"

# Set the headers and authentication for the Square API request
headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {square_api_key}"
}

# Define the request body to update the order note in Square API
request_body = {
"idempotency_key": f"update_order_{order_id}",
"order": {
"id": order_id,
"note": order_note
}
}

# Send the request to update the order note in Square API
response = requests.put(f"{square_api_endpoint}/orders/{order_id}", headers=headers, json=request_body)

# Return the response status code
return response.status_code

# Define a function to set up the Square webhook subscription
def setup_square_webhook_subscription():
# Set the headers and authentication for the Square API request
headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {square_api_key}"
}

# Define the request body to create a webhook subscription in Square API
request_body = {
"idempotency_key": "create_subscription",
"type": "ORDER_UPDATED",
"subscription_data": {
"callback_url": square_webhook_endpoint,
"version": "1.0"
}
}

# Send the request to create a webhook subscription in Square API
response = requests.post(f"{square_api_endpoint}/v1/{square_api_key}/subscriptions", headers=headers, json=request_body)

# Return the response

this might help

has it worked for you?

 

Where did you get the bearer token  / api key?

 

How did you authorise and obtain the bearer token  / api key?

 

How long is bearer token  / api key valid for?

 

Is the bearer token  / api key limited to so many sessions in a given period?

 

Thanks

 

 

Square Champion

Hi @alexws , thank you for the update this is much appreciated.

 

I think some of the frustrations expressed and I also encounter these is that there are some basic requirements for an online retail business to function are not being addressed to their best. The frustrations are further compounded with lots of resource and energy from Square being directed towards new ‘sexy’ innovative developments and products but with little forward movement on the online basics. I did look briefly at a competitor service provider recently to see how Square compared and I have to say their basic online selling functionality seemed to be ticking the boxes for an online company compared to Square, which is frustrating from a business point as we are missing so many basic selling tools crucial for small businesses to succeed. It’s really tough going out there and will continue for some months and years ahead.

 

Having said this, Square offer great POS functionality, that far exceeds that of most of its competitors. It’s reassuring that the frustrations for Square Online are being heard and that Square Online has a plan it’s working on to help address these enabling businesses to succeed and more so reassuring that Square loyal users are hanging in there . 😁👍

Don't forget though, they've been telling us "any day now" on this thread for 3 years. Please don't hold your breath.