Unable to create shipments

Hello @april!

Could you try making the call using the legacy ID instead of the ID for line items?

Please let me know how that goes.

Have a nice day!
TomasFD

Hi Tomas

Thanks for the update.

I had the dev guys check and we found that the legacy ID is received in the Shipment response so we’re not sure how to send it in the request.

We do not see the legacy ID in the order response either but let me know if we’re missing something.

Hi @april!

When creating shipments, you also send which line items you want to add to the shipment. The code would be something like this:

line_items: [{ line_item_id: "string", quantity: int }]

The field line_item_id can take both id (“TGluZUl0ZW06NjA2Njg0MjY5”) and legacy_id (“606684269”)

You can find both values like this:

query{
  order(id:"string"){
    data{
      line_items(first:10){
        edges{
          node{
            product_name
            sku
            id
            legacy_id
          }
        }
      }
    }
    complexity
    request_id
  }
}

I use name and SKU to know which line item ID belongs to which product in the UI.

Please let me know if this doesn’t help.

Kind regards,
TomasFD

Hi Tomas

We’ve tried this but sadly, it still didn’t work.

Also the UI for the Shipments Report changed so I no longer see the view label link that I showed you before. :frowning:

It was how I was checking if the label URL was showing correctly.

I am sending the request and response here if you can help me check and see if we’re sending anything differently!

Array

(

[Post Request URL : 107644] =>

[Post Request Data : 107644] => mutation {

order_create(

data: {

order_number: “23413601”

shop_name: “shiphero”

fulfillment_status: “pending”

order_date: “2022-02-02”

total_tax: “8.67”

subtotal: “43.33”

total_discounts: “0.0”

total_price: “52.00”

shipping_lines: {

title: “Royal Mail”

price: “0.0”

carrier: “Royal Mail”

method: “royal_mail / RoyalMail48”

}

shipping_address: {

first_name: “Robert N Charlton”

last_name: “”

company: “”

address1: “70 Ponteland Rd”

address2: “”

city: “HUBBERHOLME”

state: “”

state_code: “OK”

zip: “BD23 8LT”

country: “United Kingdom”

country_code: “GB”

email: “”

phone: “079 2596 7537”

}

billing_address: {

first_name: “Robert N Charlton”

last_name: “”

company: “”

address1: “70 Ponteland Rd”

address2: “”

city: “HUBBERHOLME”

state: “”

state_code: “”

zip: “BD23 8LT”

country: “United Kingdom”

country_code: “GB”

email: “”

phone: “”

}

line_items:[

{

sku: “GGRTSSEU00002A03”

partner_line_item_id: “61fa96ed12aa1”

quantity: 2

price: “33.33”

product_name: “BLACK T SHIRT - GGR”

fulfillment_status: “pending”

quantity_pending_fulfillment: 2

warehouse_id: “V2FyZWhvdXNlOjc3NDEx”

}

{

sku: “CDTEST”

partner_line_item_id: “61fa96ed12aba”

quantity: 1

price: “10.00”

product_name: “CD”

fulfillment_status: “pending”

quantity_pending_fulfillment: 1

warehouse_id: “V2FyZWhvdXNlOjc3NDEx”

}

]

required_ship_date: “2022-02-02”

}

) {

request_id

complexity

order {

id

account_id

order_number

shop_name

fulfillment_status

order_date

total_tax

subtotal

total_discounts

total_price

custom_invoice_url

account_id

email

profile

packing_note

required_ship_date

shipping_address {

first_name

last_name

company

address1

address2

city

state

state_code

zip

country

country_code

email

phone

}

line_items(first: 100) {

edges {

node {

id

sku

product_id

quantity

product_name

fulfillment_status

quantity_pending_fulfillment

quantity_allocated

backorder_quantity

eligible_for_return

customs_value

warehouse_id

locked_to_warehouse_id

}

}

}

}

}

}

[Post Response Data : 107644] => Array

(

[data] => Array

(

[order_create] => Array

(

[request_id] => 61fa96f01b900fe5f8bb88c4

[complexity] => 10

[order] => Array

(

[id] => T3JkZXI6MjQ3MzM3OTE3

[account_id] => QWNjb3VudDo2NDQ3Nw==

[order_number] => 23413601

[shop_name] => shiphero

[fulfillment_status] => pending

[order_date] => 2022-02-02T00:00:00

[total_tax] => 8.67

[subtotal] => 43.3300

[total_discounts] => 0.00

[total_price] => 52.00

[custom_invoice_url] =>

[email] =>

[profile] => default

[packing_note] =>

[required_ship_date] => 2022-02-02T00:00:00

[shipping_address] => Array

(

[first_name] => Robert N Charlton

[last_name] =>

[company] =>

[address1] => 70 Ponteland Rd

[address2] =>

[city] => HUBBERHOLME

[state] =>

[state_code] =>

[zip] => BD23 8LT

[country] => United Kingdom

[country_code] =>

[email] =>

[phone] => 079 2596 7537

)

[line_items] => Array

(

[edges] => Array

(

[0] => Array

(

[node] => Array

(

[id] => TGluZUl0ZW06NjUwMjc0NDE5

[sku] => GGRTSSEU00002A03

[product_id] =>

[quantity] => 2

[product_name] => BLACK T SHIRT - GGR

[fulfillment_status] => pending

[quantity_pending_fulfillment] => 2

[quantity_allocated] => 0

[backorder_quantity] => 0

[eligible_for_return] => 1

[customs_value] => 0.00

[warehouse_id] => V2FyZWhvdXNlOjc3NDEx

[locked_to_warehouse_id] => V2FyZWhvdXNlOjc3NDEx

)

)

[1] => Array

(

[node] => Array

(

[id] => TGluZUl0ZW06NjUwMjc0NDIw

[sku] => CDTEST

[product_id] =>

[quantity] => 1

[product_name] => CD

[fulfillment_status] => pending

[quantity_pending_fulfillment] => 1

[quantity_allocated] => 0

[backorder_quantity] => 0

[eligible_for_return] => 1

[customs_value] => 0.00

[warehouse_id] => V2FyZWhvdXNlOjc3NDEx

[locked_to_warehouse_id] => V2FyZWhvdXNlOjc3NDEx

)

)

)

)

)

)

)

)

[Post Request Shipment URL : ] =>

[Post Request Shipment Data : ] => mutation {

shipment_create(

data: {

order_id: “T3JkZXI6MjQ3MzM3OTE3”

warehouse_id: “V2FyZWhvdXNlOjc3NDEx=”

customer_account_id: “64477”

address: {

name: “Robert N Charlton”

address1: “70 Ponteland Rd”

address2: “”

city: “HUBBERHOLME”

state: “”

zip: “BD23 8LT”

country: “United Kingdom”

phone: “079 2596 7537”

}

line_items:[

{

line_item_id: “TGluZUl0ZW06NjUwMjc0NDE5”

quantity: 2

}

{

line_item_id: “TGluZUl0ZW06NjUwMjc0NDIw”

quantity: 1

}

]

labels: {

address: {

name: “Robert N Charlton”

address1: “70 Ponteland Rd”

address2: “”

city: “HUBBERHOLME”

state: “”

zip: “BD23 8LT”

country: “United Kingdom”

phone: “079 2596 7537”

}

carrier: “Royal Mail”

shipping_name: “royal_mail / RoyalMail48”

shipping_method: “royal_mail / RoyalMail48”

cost: “0.00”

dimensions: { weight: “0”, height: “0”, width: “0”, length: “0” }

label: {

paper_pdf_location: “https://goeasyship.s3.amazonaws.com/shipping_documents/f948c0ce-8ab5-407a-9e62-e8d661709c1f/ESUS67013710_brightpearl_label.png

}

line_item_ids: “TGluZUl0ZW06NjUwMjc0NDIw”

tracking_number: “12330001111”

}

notify_customer_via_shiphero: true

notify_customer_via_store: true

shipped_off_shiphero:true

}

) {

request_id

complexity

shipment {

id

legacy_id

order_id

user_id

warehouse_id

pending_shipment_id

address {

name

address1

address2

city

state

country

zip

phone

}

picked_up

needs_refund

refunded

delivered

shipped_off_shiphero

dropshipment

created_date

line_items(first: 2) {

edges {

node {

id

line_item_id

quantity

}

}

}

}

}

}

[Post Response Shipment Data : ] => Array

(

[data] => Array

(

[shipment_create] => Array

(

[request_id] => 61fa96f3973393b1828619a6

[complexity] => 10

[shipment] => Array

(

[id] => U2hpcG1lbnQ6MjM1MjM1OTgy

[legacy_id] => 235235982

[order_id] => T3JkZXI6MjQ3MzM3OTE3

[user_id] =>

[warehouse_id] => V2FyZWhvdXNlOjc3NDEx

[pending_shipment_id] =>

[address] => Array

(

[name] => Robert N Charlton None

[address1] => 70 Ponteland Rd

[address2] =>

[city] => HUBBERHOLME

[state] =>

[country] => United Kingdom

[zip] =>

[phone] =>

)

[picked_up] =>

[needs_refund] =>

[refunded] =>

[delivered] =>

[shipped_off_shiphero] => 1

[dropshipment] =>

[created_date] => 2022-02-02T14:36:36

[line_items] => Array

(

[edges] => Array

(

[0] => Array

(

[node] => Array

(

[id] => U2hpcHBlZExpbmVJdGVtOjM1ODE1MzE1NQ==

[line_item_id] => TGluZUl0ZW06NjUwMjc0NDE5

[quantity] => 2

)

)

[1] => Array

(

[node] => Array

(

[id] => U2hpcHBlZExpbmVJdGVtOjM1ODE1MzE1Ng==

[line_item_id] => TGluZUl0ZW06NjUwMjc0NDIw

[quantity] => 1

)

)

)

)

)

)

)

)

)

Hello @April!

I just reread my previous post and found out I missed the most crucial part.

Could you try using the legacy_id instead of the id?

The query I sent in my previous post was to show you how you can get that legacy_id.

Apologies for that.

Kind regards,
TomasFD

Hi Tomas

We did the change but still can’t locate the label URL in the UI :frowning:

Please check complete request and response here:

Order Create Request Datas=>

[query] => mutation {
order_create(
data: {
order_number: “23414501”
shop_name: “shiphero”
fulfillment_status: “pending”
order_date: “2022-02-04”
total_tax: “6.67”
subtotal: “33.33”
total_discounts: “0.0”
total_price: “40.00”
shipping_lines: {
title: “Royal Mail”
price: “0.0”
carrier: “Royal Mail”
method: “royal_mail / RoyalMail48”
}
shipping_address: {
first_name: “Robert N Charlton”
last_name: “”
company: “”
address1: “70 Ponteland Rd”
address2: “”
city: “HUBBERHOLME”
state: “”
state_code: “OK”
zip: “BD23 8LT”
country: “United Kingdom”
country_code: “GB”
email: “”
phone: “079 2596 7537”
}
billing_address: {
first_name: “Robert N Charlton”
last_name: “”
company: “”
address1: “70 Ponteland Rd”
address2: “”
city: “HUBBERHOLME”
state: “”
state_code: “”
zip: “BD23 8LT”
country: “United Kingdom”
country_code: “GB”
email: “”
phone: “”
}
line_items:[
{
sku: “GGRTSSEU00002A03”
partner_line_item_id: “61fd2111ac61d”
quantity: 2
price: “33.33”
product_name: “BLACK T SHIRT - GGR”
fulfillment_status: “pending”
quantity_pending_fulfillment: 2
warehouse_id: “V2FyZWhvdXNlOjc3NDEx”
}
]
required_ship_date: “2022-02-04”
}
) {
request_id
complexity
order {
id
account_id
order_number
shop_name
fulfillment_status
order_date
total_tax
subtotal
total_discounts
total_price
custom_invoice_url
account_id
email
profile
packing_note
required_ship_date
shipping_address {
first_name
last_name
company
address1
address2
city
state
state_code
zip
country
country_code
email
phone
}
line_items(first: 100) {
edges {
node {
legacy_id
id
sku
product_id
quantity
product_name
fulfillment_status
quantity_pending_fulfillment
quantity_allocated
backorder_quantity
eligible_for_return
customs_value
warehouse_id
locked_to_warehouse_id
}
}
}
}
}
}
)

Order Response Datas=>

Array
(
[data] => Array
(
[order_create] => Array
(
[request_id] => 61fd1a5375b1c1cc7a2afab8
[complexity] => 10
[order] => Array
(
[id] => T3JkZXI6MjQ3NzkzOTYy
[account_id] => QWNjb3VudDo2NDQ3Nw==
[order_number] => 23414501
[shop_name] => shiphero
[fulfillment_status] => pending
[order_date] => 2022-02-04T00:00:00
[total_tax] => 6.67
[subtotal] => 33.3300
[total_discounts] => 0.00
[total_price] => 40.00
[custom_invoice_url] =>
[email] =>
[profile] => default
[packing_note] =>
[required_ship_date] => 2022-02-04T00:00:00
[shipping_address] => Array
(
[first_name] => Robert N Charlton
[last_name] =>
[company] =>
[address1] => 70 Ponteland Rd
[address2] =>
[city] => HUBBERHOLME
[state] =>
[state_code] =>
[zip] => BD23 8LT
[country] => United Kingdom
[country_code] =>
[email] =>
[phone] => 079 2596 7537
)

[line_items] => Array
(
[edges] => Array
(
[0] => Array
(
[node] => Array
(
[legacy_id] => 651253418
[id] => TGluZUl0ZW06NjUxMjUzNDE4
[sku] => GGRTSSEU00002A03
[product_id] =>
[quantity] => 2
[product_name] => BLACK T SHIRT - GGR
[fulfillment_status] => pending
[quantity_pending_fulfillment] => 2
[quantity_allocated] => 0
[backorder_quantity] => 0
[eligible_for_return] => 1
[customs_value] => 0.00
[warehouse_id] => V2FyZWhvdXNlOjc3NDEx
[locked_to_warehouse_id] => V2FyZWhvdXNlOjc3NDEx
)

)

)

)

)

)

)

)

Shipment Create Request Datas=>

[query] => mutation {
shipment_create(
data: {
order_id: “T3JkZXI6MjQ3NzkzOTYy”
warehouse_id: “V2FyZWhvdXNlOjc3NDEx=”
customer_account_id: “64477”
address: {
name: “Robert N Charlton”
address1: “70 Ponteland Rd”
address2: “”
city: “HUBBERHOLME”
state: “”
zip: “BD23 8LT”
country: “United Kingdom”
phone: “079 2596 7537”
}
line_items:[
{
line_item_id: “651253418”
quantity: 2
}
]
labels: {
address: {
name: “Robert N Charlton”
address1: “70 Ponteland Rd”
address2: “”
city: “HUBBERHOLME”
state: “”
zip: “BD23 8LT”
country: “United Kingdom”
phone: “079 2596 7537”
}
carrier: “Royal Mail”
shipping_name: “royal_mail / RoyalMail48”
shipping_method: “royal_mail / RoyalMail48”
cost: “0.00”
dimensions: { weight: “0”, height: “0”, width: “0”, length: “0” }
label: {
paper_pdf_location: “https://goeasyship.s3.amazonaws.com/shipping_documents/f948c0ce-8ab5-407a-9e62-e8d661709c1f/ESUS67013710_brightpearl_label.png
}
line_item_ids: “TGluZUl0ZW06NjUxMjUzNDE4”
tracking_number: “1111111111”
}
notify_customer_via_shiphero: true
notify_customer_via_store: true
shipped_off_shiphero:true
}
) {
request_id
complexity
shipment {
id
legacy_id
order_id
user_id
warehouse_id
pending_shipment_id
address {
name
address1
address2
city
state
country
zip
phone
}
picked_up
needs_refund
refunded
delivered
shipped_off_shiphero
dropshipment
created_date
line_items(first: 2) {
edges {
node {
id
legacy_id
line_item_id
quantity
}
}
}
}
}
}
)

Shipment Respnse Datas =>

Array
(
[data] => Array
(
[shipment_create] => Array
(
[request_id] => 61fd1a578ff361328b0e0695
[complexity] => 10
[shipment] => Array
(
[id] => U2hpcG1lbnQ6MjM1Nzg4NDE2
[legacy_id] => 235788416
[order_id] => T3JkZXI6MjQ3NzkzOTYy
[user_id] =>
[warehouse_id] => V2FyZWhvdXNlOjc3NDEx
[pending_shipment_id] =>
[address] => Array
(
[name] => Robert N Charlton None
[address1] => 70 Ponteland Rd
[address2] =>
[city] => HUBBERHOLME
[state] =>
[country] => United Kingdom
[zip] =>
[phone] =>
)

[picked_up] =>
[needs_refund] =>
[refunded] =>
[delivered] =>
[shipped_off_shiphero] => 1
[dropshipment] =>
[created_date] => 2022-02-04T12:21:43
[line_items] => Array
(
[edges] => Array
(
[0] => Array
(
[node] => Array
(
[id] => U2hpcHBlZExpbmVJdGVtOjM1ODk1OTQ0NQ==
[legacy_id] => 358959445
[line_item_id] => TGluZUl0ZW06NjUxMjUzNDE4
[quantity] => 2
)

)

)

)

)

)

)

)