- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
How do I program my API to add the requested shipping info?
[The title of this thread has been edited from the original: Add tracking_number, carrier, and tracking_url to an order using UPDATE order API]
I use a 3rd party app to generate shipping label & I want to use the orders API To add the tracking info (carrier, tracking_number, tracking_url) using a sparse order object but I am getting a strange error:
Orders with multiple fulfillments must specify the line items linked to each fulfillment using the ENTRY_LIST line_item_application type.
I am sending the following JSON payload:
{"idempotency_key": "xxxxxxxxxxxxxxxxx", "order":{"version": X, "fulfillments": [{"shipment_details": {"carrier": "USPS", "tracking_number":"XXXX", "tracking_url": "XXXX"}}]}}
To the following endpoint:
PUT https://connect.squareup.com/v2/locations/ABC/orders/XYZ
Thank you for your help!
- Labels:
-
E-Commerce API
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Hello @donutshoppe,
Thanks for posting in the Seller Community.
I'd love to gather more information on this, but before I do, I have a couple of clarifying questions.
First, what 3rd party app are you using? Second, do you have a website that your customer's use to take orders from? If so, please send the URL here in a thread. Thank you.
I'll keep an eye out for your reply.
Community Moderator, Square // Moderador de la Comunidad, Square
Sign in and click Mark as Best Answer if my reply answers your question.
Inicie seción y haga clic en Marcar como "Mejor Respuesta" si mi respuesta contesta su pregunta.
- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
I am using an application that I created called Rhythmic Equations (rhythmicequations.com) that integrates with Easypost to create shipping labels for Discogs orders. The app syncs Discogs inventory with Square inventory so we just started getting some orders via the built-in Square Online Store.
So now we want to finish building the ability to fulfill both Square and Discogs orders via Rhythmic Equations. I was able to bring in the Square online orders & shipping info, but I'm having some trouble when adding shipping info and updating status of the order.
Appreciate your time.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Hi @donutshoppe,
Thank you for your patience. We escalated this up to our API team and they relayed a couple of things.
With the JSON payload provided, there are a couple errors.
- Within fulfillments you need to pass a type of SHIPMENT.
- Within shipment_details you also need to pass recipient with at least display_name
That would be enough to get it to work successfully, but there wouldn’t be any items attached to it since they are also not passing line_items.
Also, provided is a full working example.
{
"idempotency_key": "XXXXXX",
"order":
{"fulfillments":
[
{
"type": "SHIPMENT",
"shipment_details":
{
"carrier": "USPS",
"tracking_number":"XXXX",
"tracking_url": "XXXX",
"recipient": {
"display_name": "John Doe"
}
}
}
]
}
}
If you are still experiencing issues, we recommend contacting our API team directly via email through this contact from. This will insure you get your question escalated to a specialist that can specifically look into your account details.
Let us know if you have any other questions by replying in this thread.
Community Moderator, Square // Moderador de la Comunidad, Square
Sign in and click Mark as Best Answer if my reply answers your question.
Inicie seción y haga clic en Marcar como "Mejor Respuesta" si mi respuesta contesta su pregunta.
- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Thanks a lot for your response. I did end up opening a case and it appears I was also missing the fulfillment uid in the fulfillments object. This ended up being the working JSON payload in case anyone else runs into this issue:
When moving an order from PROPOSED or RESERVED state to COMPLETED while populating the tracking info send JSON payload:
{"idempotency_key": "xxxxxxxxxxxxxxxx", "order":{"version": X, "fulfillments": [{"uid": "xxxxxxxxxxxxxxxxxxxxx", "shipment_details": {"carrier": "U.S. Postal Service", "tracking_number":"XYZ", "tracking_url": "https://", "shipped_at": "2020-03-30T19:18:42.699Z", "in_progress_at": "2020-03-29T01:22:06.971Z"}, "state": "COMPLETED"}], "state": "COMPLETED"}}
to PUT https://connect.squareup.com/v2/locations/XYZ/orders/123 endpoint
Thanks for your team's very prompt support.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report